From: Scott Barninger Date: Sat, 4 Dec 2004 14:10:50 +0000 (+0000) Subject: Bug 183 fixes. X-Git-Tag: Release-1.38.0~723 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cc7655501b943de3162ea302b5f52f3f98a747f2;p=bacula%2Fbacula Bug 183 fixes. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1741 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/platforms/mandrake/bacula.spec.in b/bacula/platforms/mandrake/bacula.spec.in index 50ef8fb926..d5c117ac18 100644 --- a/bacula/platforms/mandrake/bacula.spec.in +++ b/bacula/platforms/mandrake/bacula.spec.in @@ -282,7 +282,7 @@ features that make it easy to find and recover lost or damaged files. Bacula source code has been released under the GPL version 2 license. This package installs scripts for disaster recovery and builds rescue -floppy disks for bare metal recovery. This package includes tomsrtbt +floppy disks and cdroms for bare metal recovery. This package includes tomsrtbt (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool to build a boot floppy disk. @@ -290,14 +290,20 @@ You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or bacula-client package for your platform installed and configured before installing this package. -To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue +To create a floppy boot disk run "./getdiskinfo" from the /etc/bacula/rescue/floppy directory (this is done when the package is first installed), -then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/ +then run "./install.s" from the /etc/bacula/rescue/floppy/tomsrtbt/ directory. To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula --copy-etc-files" -from the /etc/bacula/rescue directory. To recreate the rescue +from the /etc/bacula/rescue/floppy directory. To recreate the rescue information for this system run ./getdiskinfo again. +To create a rescue cdrom run "make all" from the /etc/bacula/rescue/cdrom +directory which will create an iso image file. You can burn that image with your +favorite cd burning utility or run "make burn" after examining and possibly +adjusting /etc/bacula/rescue/cdrom/Makefile. To recreate the rescue +information for this system run /etc/bacula/rescue/cdrom/bacula/getdiskinfo again. + %package updatedb Summary: Bacula - The Network Backup Solution @@ -687,7 +693,7 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf %pre mysql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -714,7 +720,7 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then @@ -738,7 +744,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -820,7 +826,7 @@ fi %pre sqlite # test for bacula database older than version 7 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." echo "You appear to be running database version $DB_VER. You must first update" @@ -846,7 +852,7 @@ fi # test for an existing database if [ -s %{working_dir}/bacula.db ]; then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` # check to see if we need to upgrade a 1.34 or lower database if [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade requires a database update to version 8. You appear to" @@ -875,7 +881,7 @@ else fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -953,7 +959,7 @@ fi %pre postgresql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -975,17 +981,17 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then echo "Hmm, doesn't look like you have an existing database." - echo "Granting privileges for PostgreSQL user bacula..." - /etc/bacula/grant_postgresql_privileges echo "Creating PostgreSQL bacula database..." /etc/bacula/create_postgresql_database echo "Creating bacula tables..." /etc/bacula/make_postgresql_tables + echo "Granting privileges for PostgreSQL user bacula..." + /etc/bacula/grant_postgresql_privileges # check to see if we need to upgrade a 1.34 or lower database elif [ "$DB_VER" -lt "8" ]; then @@ -999,7 +1005,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -1128,6 +1134,10 @@ echo "The database update scripts were installed to /etc/bacula/updatedb" %changelog +* Sat Dec 04 2004 D. Scott Barninger +- bug 183 fixes +- thanks to Daniel Widyono +- update description for rescue package to describe cdrom creation * Thu Nov 18 2004 D. Scott Barninger - update depkgs to 29Oct04 * Fri Nov 12 2004 D. Scott Barninger diff --git a/bacula/platforms/redhat/bacula.spec.in b/bacula/platforms/redhat/bacula.spec.in index 50ef8fb926..d5c117ac18 100644 --- a/bacula/platforms/redhat/bacula.spec.in +++ b/bacula/platforms/redhat/bacula.spec.in @@ -282,7 +282,7 @@ features that make it easy to find and recover lost or damaged files. Bacula source code has been released under the GPL version 2 license. This package installs scripts for disaster recovery and builds rescue -floppy disks for bare metal recovery. This package includes tomsrtbt +floppy disks and cdroms for bare metal recovery. This package includes tomsrtbt (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool to build a boot floppy disk. @@ -290,14 +290,20 @@ You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or bacula-client package for your platform installed and configured before installing this package. -To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue +To create a floppy boot disk run "./getdiskinfo" from the /etc/bacula/rescue/floppy directory (this is done when the package is first installed), -then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/ +then run "./install.s" from the /etc/bacula/rescue/floppy/tomsrtbt/ directory. To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula --copy-etc-files" -from the /etc/bacula/rescue directory. To recreate the rescue +from the /etc/bacula/rescue/floppy directory. To recreate the rescue information for this system run ./getdiskinfo again. +To create a rescue cdrom run "make all" from the /etc/bacula/rescue/cdrom +directory which will create an iso image file. You can burn that image with your +favorite cd burning utility or run "make burn" after examining and possibly +adjusting /etc/bacula/rescue/cdrom/Makefile. To recreate the rescue +information for this system run /etc/bacula/rescue/cdrom/bacula/getdiskinfo again. + %package updatedb Summary: Bacula - The Network Backup Solution @@ -687,7 +693,7 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf %pre mysql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -714,7 +720,7 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then @@ -738,7 +744,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -820,7 +826,7 @@ fi %pre sqlite # test for bacula database older than version 7 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." echo "You appear to be running database version $DB_VER. You must first update" @@ -846,7 +852,7 @@ fi # test for an existing database if [ -s %{working_dir}/bacula.db ]; then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` # check to see if we need to upgrade a 1.34 or lower database if [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade requires a database update to version 8. You appear to" @@ -875,7 +881,7 @@ else fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -953,7 +959,7 @@ fi %pre postgresql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -975,17 +981,17 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then echo "Hmm, doesn't look like you have an existing database." - echo "Granting privileges for PostgreSQL user bacula..." - /etc/bacula/grant_postgresql_privileges echo "Creating PostgreSQL bacula database..." /etc/bacula/create_postgresql_database echo "Creating bacula tables..." /etc/bacula/make_postgresql_tables + echo "Granting privileges for PostgreSQL user bacula..." + /etc/bacula/grant_postgresql_privileges # check to see if we need to upgrade a 1.34 or lower database elif [ "$DB_VER" -lt "8" ]; then @@ -999,7 +1005,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -1128,6 +1134,10 @@ echo "The database update scripts were installed to /etc/bacula/updatedb" %changelog +* Sat Dec 04 2004 D. Scott Barninger +- bug 183 fixes +- thanks to Daniel Widyono +- update description for rescue package to describe cdrom creation * Thu Nov 18 2004 D. Scott Barninger - update depkgs to 29Oct04 * Fri Nov 12 2004 D. Scott Barninger diff --git a/bacula/platforms/suse/bacula.spec.in b/bacula/platforms/suse/bacula.spec.in index 50ef8fb926..d5c117ac18 100644 --- a/bacula/platforms/suse/bacula.spec.in +++ b/bacula/platforms/suse/bacula.spec.in @@ -282,7 +282,7 @@ features that make it easy to find and recover lost or damaged files. Bacula source code has been released under the GPL version 2 license. This package installs scripts for disaster recovery and builds rescue -floppy disks for bare metal recovery. This package includes tomsrtbt +floppy disks and cdroms for bare metal recovery. This package includes tomsrtbt (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool to build a boot floppy disk. @@ -290,14 +290,20 @@ You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or bacula-client package for your platform installed and configured before installing this package. -To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue +To create a floppy boot disk run "./getdiskinfo" from the /etc/bacula/rescue/floppy directory (this is done when the package is first installed), -then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/ +then run "./install.s" from the /etc/bacula/rescue/floppy/tomsrtbt/ directory. To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula --copy-etc-files" -from the /etc/bacula/rescue directory. To recreate the rescue +from the /etc/bacula/rescue/floppy directory. To recreate the rescue information for this system run ./getdiskinfo again. +To create a rescue cdrom run "make all" from the /etc/bacula/rescue/cdrom +directory which will create an iso image file. You can burn that image with your +favorite cd burning utility or run "make burn" after examining and possibly +adjusting /etc/bacula/rescue/cdrom/Makefile. To recreate the rescue +information for this system run /etc/bacula/rescue/cdrom/bacula/getdiskinfo again. + %package updatedb Summary: Bacula - The Network Backup Solution @@ -687,7 +693,7 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf %pre mysql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -714,7 +720,7 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` +DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then @@ -738,7 +744,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -820,7 +826,7 @@ fi %pre sqlite # test for bacula database older than version 7 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." echo "You appear to be running database version $DB_VER. You must first update" @@ -846,7 +852,7 @@ fi # test for an existing database if [ -s %{working_dir}/bacula.db ]; then - DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null` + DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1` # check to see if we need to upgrade a 1.34 or lower database if [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade requires a database update to version 8. You appear to" @@ -875,7 +881,7 @@ else fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -953,7 +959,7 @@ fi %pre postgresql # test for bacula database older than version 7 # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then echo "This bacula upgrade will update a bacula database from version 7 to 8." @@ -975,17 +981,17 @@ fi # test for an existing database # note: this ASSUMES no password has been set for bacula database -DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null` +DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1` # grant privileges and create tables if they do not exist if [ -z "$DB_VER" ]; then echo "Hmm, doesn't look like you have an existing database." - echo "Granting privileges for PostgreSQL user bacula..." - /etc/bacula/grant_postgresql_privileges echo "Creating PostgreSQL bacula database..." /etc/bacula/create_postgresql_database echo "Creating bacula tables..." /etc/bacula/make_postgresql_tables + echo "Granting privileges for PostgreSQL user bacula..." + /etc/bacula/grant_postgresql_privileges # check to see if we need to upgrade a 1.34 or lower database elif [ "$DB_VER" -lt "8" ]; then @@ -999,7 +1005,7 @@ elif [ "$DB_VER" -lt "8" ]; then fi # create the daemon group -HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null` +HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null` if [ -z $HAVE_BACULA ]; then %{groupadd} -r %{daemon_group} > /dev/null 2>&1 echo "The group %{daemon_group} has been added to %{groupfile}." @@ -1128,6 +1134,10 @@ echo "The database update scripts were installed to /etc/bacula/updatedb" %changelog +* Sat Dec 04 2004 D. Scott Barninger +- bug 183 fixes +- thanks to Daniel Widyono +- update description for rescue package to describe cdrom creation * Thu Nov 18 2004 D. Scott Barninger - update depkgs to 29Oct04 * Fri Nov 12 2004 D. Scott Barninger