]> git.sur5r.net Git - bacula/bacula/commitdiff
Insure that bat.conf is not overwritten during installation.
authorKern Sibbald <kern@sibbald.com>
Wed, 25 Apr 2007 13:43:25 +0000 (13:43 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 25 Apr 2007 13:43:25 +0000 (13:43 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4631 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/config.h.in
bacula/autoconf/configure.in
bacula/configure
bacula/src/qt-console/install_conf_file.in [new file with mode: 0755]
bacula/src/stored/stored.h
bacula/technotes-2.1

index 9ca7d391dde61b779bb974a0c3d7434c1fcd9e24..34bca4c309b094492c6ce532e491abb588c8a374 100644 (file)
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at runtime.
-        STACK_DIRECTION > 0 => grows toward higher addresses
-        STACK_DIRECTION < 0 => grows toward lower addresses
-        STACK_DIRECTION = 0 => direction of growth unknown */
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
 #undef STACK_DIRECTION
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
index e1f6607585013587b62292fccdc544e3092a926d..1c43f0fd5527e7257378513f1ebe9d885fd6afb6 100644 (file)
@@ -2047,6 +2047,7 @@ AC_OUTPUT([autoconf/Make.common \
           src/gnome2-console/bgnome-console.conf \
           src/qt-console/bat.conf \
           src/qt-console/bat.pro \
+          src/qt-console/install_conf_file \
           src/wx-console/Makefile \
           src/wx-console/bwx-console.conf \
           src/tray-monitor/Makefile \
@@ -2138,6 +2139,8 @@ chmod 755 $c/mysql
 
 chmod 755 src/win32/build-depkgs-mingw32
 
+chmod 755 src/qt-console/install_conf_file
+
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
    largefile_support="yes"
 fi
index 2f29990584f0e2834538c9737f3646c9d03a6260..bcba46b0d35e22d5b634fa2e76b6fa56cb4d9294 100755 (executable)
@@ -33963,7 +33963,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in $PFILES"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -34566,6 +34566,7 @@ do
     "src/gnome2-console/bgnome-console.conf") CONFIG_FILES="$CONFIG_FILES src/gnome2-console/bgnome-console.conf" ;;
     "src/qt-console/bat.conf") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.conf" ;;
     "src/qt-console/bat.pro") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.pro" ;;
+    "src/qt-console/install_conf_file") CONFIG_FILES="$CONFIG_FILES src/qt-console/install_conf_file" ;;
     "src/wx-console/Makefile") CONFIG_FILES="$CONFIG_FILES src/wx-console/Makefile" ;;
     "src/wx-console/bwx-console.conf") CONFIG_FILES="$CONFIG_FILES src/wx-console/bwx-console.conf" ;;
     "src/tray-monitor/Makefile") CONFIG_FILES="$CONFIG_FILES src/tray-monitor/Makefile" ;;
@@ -35599,6 +35600,8 @@ chmod 755 $c/mysql
 
 chmod 755 src/win32/build-depkgs-mingw32
 
+chmod 755 src/qt-console/install_conf_file
+
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
    largefile_support="yes"
 fi
diff --git a/bacula/src/qt-console/install_conf_file.in b/bacula/src/qt-console/install_conf_file.in
new file mode 100755 (executable)
index 0000000..e4a3b00
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+sbindir=@sbindir@
+sysconfdir=@sysconfdir@
+INSTALL_CONFIG="@INSTALL@ -m 640"
+
+srcconf=bat.conf
+if  test -f ${DESTDIR}${sysconfdir}/${srcconf}; then
+  destconf=${srcconf}.new
+  echo "  ==> Found existing $srcconf, installing new conf file as ${destconf}"
+else
+  destconf=${srcconf}
+fi
+echo "${INSTALL_CONFIG} ${srcconf} ${DESTDIR}${sysconfdir}/${destconf}"
+${INSTALL_CONFIG} ${srcconf} ${DESTDIR}${sysconfdir}/${destconf}
index a530d9a2a53e7283141ae6a053c40cc1424d1cbe..7516a7e9ea4b240cea34d3d662c479f9b386d15d 100644 (file)
@@ -37,7 +37,7 @@
 #define STORAGE_DAEMON 1
 
 /* Set to debug mutexes */
-#define SD_DEBUG_LOCK
+//#define SD_DEBUG_LOCK
 const int sd_dbglvl = 100;
 
 #ifdef HAVE_MTIO_H
index 71f3de66c827830f1cb2043f509703ac0a28ffe6..ff53aaa2bbe93a5a258d4ff1a6bb2961f4158d69 100644 (file)
@@ -2,6 +2,7 @@
 
 General:
 25Apr07
+kes  Insure that bat.conf is not overwritten during installation.
 kes  Fix important bug in db_sql_query() in mysql.c.  It was introduced
      while I was implementing migration in March 2006 !
 24Apr07
@@ -109,7 +110,7 @@ kes  Correct migration prune SQL typo that crept in in a
 01Apr07
 kes  Move bnet_despool() into class in bsock.c
 kes  Modify job report to include director name and Build OS.
-kes  Move drop and check_catalog() before fork.
+kes  Move drop root privilege and check_catalog() before fork.
 kes  Add update database scripts (version 9 to 10) to updatedb directory.
 31Mar07
 ebl  Check size and age of each file after its backup to see if