From: Kern Sibbald Date: Wed, 28 Jul 2010 16:59:31 +0000 (+0200) Subject: Backport some 5.1 changes to 5.0 X-Git-Tag: Release-5.0.3~50 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=933a06a17d50092e5d45469ce8ec61993768a032;p=bacula%2Fbacula Backport some 5.1 changes to 5.0 --- diff --git a/bacula/platforms/alpha/bacula-fd.in b/bacula/platforms/alpha/bacula-fd.in index 97fc249613..74a12c00dd 100644 --- a/bacula/platforms/alpha/bacula-fd.in +++ b/bacula/platforms/alpha/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/bsdi/bacula-dir.in b/bacula/platforms/bsdi/bacula-dir.in index e7e76b1618..af7b0c5c1a 100755 --- a/bacula/platforms/bsdi/bacula-dir.in +++ b/bacula/platforms/bsdi/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/bsdi/bacula-fd.in b/bacula/platforms/bsdi/bacula-fd.in index 54f17b9a96..2c41b34325 100755 --- a/bacula/platforms/bsdi/bacula-fd.in +++ b/bacula/platforms/bsdi/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/bsdi/bacula-sd.in b/bacula/platforms/bsdi/bacula-sd.in index fb55fb47cf..9f4e6f0c70 100755 --- a/bacula/platforms/bsdi/bacula-sd.in +++ b/bacula/platforms/bsdi/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/freebsd/bacula-dir.in b/bacula/platforms/freebsd/bacula-dir.in index e7e76b1618..af7b0c5c1a 100755 --- a/bacula/platforms/freebsd/bacula-dir.in +++ b/bacula/platforms/freebsd/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/freebsd/bacula-fd.in b/bacula/platforms/freebsd/bacula-fd.in index 54f17b9a96..2c41b34325 100755 --- a/bacula/platforms/freebsd/bacula-fd.in +++ b/bacula/platforms/freebsd/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/freebsd/bacula-sd.in b/bacula/platforms/freebsd/bacula-sd.in index fb55fb47cf..9f4e6f0c70 100755 --- a/bacula/platforms/freebsd/bacula-sd.in +++ b/bacula/platforms/freebsd/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/gentoo/bacula-dir.in b/bacula/platforms/gentoo/bacula-dir.in index 9ce3b0b649..a4cbca733d 100755 --- a/bacula/platforms/gentoo/bacula-dir.in +++ b/bacula/platforms/gentoo/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon for the Gentoo release # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/gentoo/bacula-fd.in b/bacula/platforms/gentoo/bacula-fd.in index 67e335ab77..98e5efeb36 100755 --- a/bacula/platforms/gentoo/bacula-fd.in +++ b/bacula/platforms/gentoo/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon for the Gentoo release. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/gentoo/bacula-sd.in b/bacula/platforms/gentoo/bacula-sd.in index 753416e114..26c6f74566 100755 --- a/bacula/platforms/gentoo/bacula-sd.in +++ b/bacula/platforms/gentoo/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon for the Gentoo release. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/irix/bacula-dir.in b/bacula/platforms/irix/bacula-dir.in index e7e76b1618..af7b0c5c1a 100755 --- a/bacula/platforms/irix/bacula-dir.in +++ b/bacula/platforms/irix/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/irix/bacula-fd.in b/bacula/platforms/irix/bacula-fd.in index d7672d3f51..671eb4b0c2 100755 --- a/bacula/platforms/irix/bacula-fd.in +++ b/bacula/platforms/irix/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/irix/bacula-sd.in b/bacula/platforms/irix/bacula-sd.in index fb55fb47cf..9f4e6f0c70 100755 --- a/bacula/platforms/irix/bacula-sd.in +++ b/bacula/platforms/irix/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/mandrake/bacula-dir.in b/bacula/platforms/mandrake/bacula-dir.in index 0f82a1a4a5..431244672c 100755 --- a/bacula/platforms/mandrake/bacula-dir.in +++ b/bacula/platforms/mandrake/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/mandrake/bacula-fd.in b/bacula/platforms/mandrake/bacula-fd.in index a6f31e9198..c447fb159f 100755 --- a/bacula/platforms/mandrake/bacula-fd.in +++ b/bacula/platforms/mandrake/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/mandrake/bacula-sd.in b/bacula/platforms/mandrake/bacula-sd.in index f496b14f88..f0144dd955 100755 --- a/bacula/platforms/mandrake/bacula-sd.in +++ b/bacula/platforms/mandrake/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/mandrake/bacula.spec.bluca.in b/bacula/platforms/mandrake/bacula.spec.bluca.in index 7f645fa8c7..8f596c29ed 100644 --- a/bacula/platforms/mandrake/bacula.spec.bluca.in +++ b/bacula/platforms/mandrake/bacula.spec.bluca.in @@ -13,7 +13,7 @@ %{?_with_wrap: %{expand: %%global TCPW 1}} %{?_without_wrap: %{expand: %%global TCPW 0}} -%define blurb Bacula - It comes by night and sucks the vital essence from your computers. +%define blurb Bacula - The Leading Open Source Backup Solution. Summary: Bacula - The Network Backup Solution Name: %{name} @@ -146,25 +146,25 @@ mv doc/html-manual/*.gif doc/manual cd %{name}-%{version} %serverbuild %configure \ - --enable-smartalloc \ + --enable-smartalloc \ %if %{MYSQL} --with-mysql \ %else --with-sqlite \ %endif %if %{GNOME} - --enable-gnome \ + --enable-gnome \ %endif %if %{TCPW} - --with-tcp-wrappers \ + --with-tcp-wrappers \ %endif --sysconfdir=%{_sysconfdir}/%{name} \ --with-scriptdir=%{_libexecdir}/%{name} \ --with-working-dir=%{_localstatedir}/%{name} \ --with-subsys-dir=/var/lock/subsys \ - --with-dir-password="#FAKE#DIR#PASSWORD#" \ - --with-fd-password="#FAKE#FD#PASSWORD#" \ - --with-sd-password="#FAKE#SD#PASSWORD#" + --with-dir-password="#FAKE#DIR#PASSWORD#" \ + --with-fd-password="#FAKE#FD#PASSWORD#" \ + --with-sd-password="#FAKE#SD#PASSWORD#" %make @@ -246,27 +246,27 @@ rm -rf %{buildroot} %pre dir -p /usr/bin/perl umask(0077); if ( -f "%{_sysconfdir}/%{name}/.pw.sed") { - if ( -f "%{_sysconfdir}/%{name}/bacula-dir.conf") { - system "sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed"; - system "sed -f %{_sysconfdir}/%{name}/.upw.sed %{_sysconfdir}/%{name}/bacula-dir.conf > %{_sysconfdir}/%{name}/bacula-dir.conf.tmp"; - unlink "%{_sysconfdir}/%{name}/bacula-dir.conf"; - rename "%{_sysconfdir}/%{name}/bacula-dir.conf.tmp", "%{_sysconfdir}/%{name}/bacula-dir.conf"; - unlink "%{_sysconfdir}/%{name}/.upw.sed"; - } + if ( -f "%{_sysconfdir}/%{name}/bacula-dir.conf") { + system "sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed"; + system "sed -f %{_sysconfdir}/%{name}/.upw.sed %{_sysconfdir}/%{name}/bacula-dir.conf > %{_sysconfdir}/%{name}/bacula-dir.conf.tmp"; + unlink "%{_sysconfdir}/%{name}/bacula-dir.conf"; + rename "%{_sysconfdir}/%{name}/bacula-dir.conf.tmp", "%{_sysconfdir}/%{name}/bacula-dir.conf"; + unlink "%{_sysconfdir}/%{name}/.upw.sed"; + } } else { - mkdir("%{_sysconfdir}/%{name}"); - open(IN, "/dev/random") or die "$!"; - open(OUT, ">%{_sysconfdir}/%{name}/.pw.sed") or die "$!"; - foreach $c ("DIR","SD","FD") { - read(IN, $buf, 32); - my $res = pack("u", $buf); - $res =~ s/^.//mg; - $res =~ s/\n//g; - $res =~ tr|` -_|AA-Za-z0-9+/|; - print OUT "s!#YOU MUST SET THE $c PASSWORD#!\"$res\"!\n"; - } - close (IN); - close (OUT); + mkdir("%{_sysconfdir}/%{name}"); + open(IN, "/dev/random") or die "$!"; + open(OUT, ">%{_sysconfdir}/%{name}/.pw.sed") or die "$!"; + foreach $c ("DIR","SD","FD") { + read(IN, $buf, 32); + my $res = pack("u", $buf); + $res =~ s/^.//mg; + $res =~ s/\n//g; + $res =~ tr|` -_|AA-Za-z0-9+/|; + print OUT "s!#YOU MUST SET THE $c PASSWORD#!\"$res\"!\n"; + } + close (IN); + close (OUT); } %post dir @@ -275,43 +275,43 @@ if ( -f "%{_sysconfdir}/%{name}/.pw.sed") { DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null` if [ -z "$DB_VER" ]; then # grant privileges and create tables - echo "Granting privileges for MySQL user bacula..." - %{_libexecdir}/%{name}/grant_mysql_privileges > dev/null - echo "Creating MySQL bacula database..." - %{_libexecdir}/%{name}/create_mysql_database > dev/null - echo "Creating bacula tables..." - %{_libexecdir}/%{name}/make_mysql_tables > dev/null + echo "Granting privileges for MySQL user bacula..." + %{_libexecdir}/%{name}/grant_mysql_privileges > dev/null + echo "Creating MySQL bacula database..." + %{_libexecdir}/%{name}/create_mysql_database > dev/null + echo "Creating bacula tables..." + %{_libexecdir}/%{name}/make_mysql_tables > dev/null elif [ "$DB_VER" -lt "6" ]; then - echo "Backing up bacula tables" - mysqldump -f --opt bacula | bzip2 > %{_localstatedir}/%{name}/bacula_backup.sql.bz2 - echo "Upgrading bacula tables" - %{_libexecdir}/%{name}/alter_mysql_tables - echo "If bacula works correctly you can remove the backup file %{_localstatedir}/%{name}/bacula_backup.sql.bz2" + echo "Backing up bacula tables" + mysqldump -f --opt bacula | bzip2 > %{_localstatedir}/%{name}/bacula_backup.sql.bz2 + echo "Upgrading bacula tables" + %{_libexecdir}/%{name}/alter_mysql_tables + echo "If bacula works correctly you can remove the backup file %{_localstatedir}/%{name}/bacula_backup.sql.bz2" fi %else if [ -s %{_localstatedir}/%{name}/bacula.db ]; then DB_VER=`echo "select * from Version;" | sqlite %{_localstatedir}/%{name}/bacula.db|tail -n 1 2>/dev/null` - if [ "$DB_VER" -lt "6" ]; then - echo "Backing up bacula tables" - echo ".dump" | sqlite %{_localstatedir}/%{name}/bacula.db | bzip2 > %{_localstatedir}/%{name}/bacula_backup.sql.bz2 - echo "Upgrading bacula tables" - %{_libexecdir}/%{name}/alter_sqlite_tables - echo "If bacula works correctly you can remove the backup file %{_localstatedir}/%{name}/bacula_backup.sql.bz2" - fi + if [ "$DB_VER" -lt "6" ]; then + echo "Backing up bacula tables" + echo ".dump" | sqlite %{_localstatedir}/%{name}/bacula.db | bzip2 > %{_localstatedir}/%{name}/bacula_backup.sql.bz2 + echo "Upgrading bacula tables" + %{_libexecdir}/%{name}/alter_sqlite_tables + echo "If bacula works correctly you can remove the backup file %{_localstatedir}/%{name}/bacula_backup.sql.bz2" + fi else # create the tables - echo "Creating bacula tables..." - %{_libexecdir}/%{name}/make_sqlite_tables > dev/null + echo "Creating bacula tables..." + %{_libexecdir}/%{name}/make_sqlite_tables > dev/null fi %endif chmod -R 600 %{_localstatedir}/%{name}/* for i in %{_sysconfdir}/%{name}/*.conf %{_sysconfdir}/%{name}/*.conf.rpmnew %{_sysconfdir}/%{name}/*.conf.rpmsave; do - if [ -s $i ]; then - sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp + if [ -s $i ]; then + sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp # this is needed if upgrading from 1.30a or lower - sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i - rm -f $i.tmp - fi + sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i + rm -f $i.tmp + fi done %_post_service bacula-dir @@ -333,23 +333,23 @@ done umask 077 i=%{_sysconfdir}/%{name}/bacula-fd.conf if [ -s %{_sysconfdir}/%{name}/.pw.sed -a -s $i ]; then - sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed - sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp - mv -f $i.tmp $i - rm -f %{_sysconfdir}/%{name}/.upw.sed + sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed + sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp + mv -f $i.tmp $i + rm -f %{_sysconfdir}/%{name}/.upw.sed fi %post fd %_post_service bacula-fd if [ -s %{_sysconfdir}/%{name}/.pw.sed ]; then - for i in %{_sysconfdir}/%{name}/bacula-fd.conf %{_sysconfdir}/%{name}/bacula-fd.conf.rpmnew %{_sysconfdir}/%{name}/bacula-fd.conf.rpmsave; do - if [ -s $i ]; then - sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp + for i in %{_sysconfdir}/%{name}/bacula-fd.conf %{_sysconfdir}/%{name}/bacula-fd.conf.rpmnew %{_sysconfdir}/%{name}/bacula-fd.conf.rpmsave; do + if [ -s $i ]; then + sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp # this is needed if upgrading from 1.30a or lower - sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i - rm -f $i.tmp - fi - done + sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i + rm -f $i.tmp + fi + done fi %preun fd @@ -376,23 +376,23 @@ fi umask 077 i=%{_sysconfdir}/%{name}/bacula-sd.conf if [ -s %{_sysconfdir}/%{name}/.pw.sed -a -s $i ]; then - sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed - sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp - mv -f $i.tmp $i - rm -f %{_sysconfdir}/%{name}/.upw.sed + sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed + sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp + mv -f $i.tmp $i + rm -f %{_sysconfdir}/%{name}/.upw.sed fi %post sd %_post_service bacula-sd if [ -s %{_sysconfdir}/%{name}/.pw.sed ]; then - for i in %{_sysconfdir}/%{name}/bacula-sd.conf %{_sysconfdir}/%{name}/bacula-sd.conf.rpmnew %{_sysconfdir}/%{name}/bacula-sd.conf.rpmsave; do - if [ -s $i ]; then - sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp + for i in %{_sysconfdir}/%{name}/bacula-sd.conf %{_sysconfdir}/%{name}/bacula-sd.conf.rpmnew %{_sysconfdir}/%{name}/bacula-sd.conf.rpmsave; do + if [ -s $i ]; then + sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp # this is needed if upgrading from 1.30a or lower - sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i - rm -f $i.tmp - fi - done + sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i + rm -f $i.tmp + fi + done fi %preun sd @@ -411,22 +411,22 @@ fi umask 077 i=%{_sysconfdir}/%{name}/console.conf if [ -s %{_sysconfdir}/%{name}/.pw.sed -a -s $i ]; then - sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed - sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp - mv -f $i.tmp $i - rm -f %{_sysconfdir}/%{name}/.upw.sed + sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed + sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp + mv -f $i.tmp $i + rm -f %{_sysconfdir}/%{name}/.upw.sed fi %post console if [ -s %{_sysconfdir}/%{name}/.pw.sed ]; then - for i in %{_sysconfdir}/%{name}/console.conf %{_sysconfdir}/%{name}/console.conf.rpmnew %{_sysconfdir}/%{name}/console.conf.rpmsave; do - if [ -s $i ]; then - sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp + for i in %{_sysconfdir}/%{name}/console.conf %{_sysconfdir}/%{name}/console.conf.rpmnew %{_sysconfdir}/%{name}/console.conf.rpmsave; do + if [ -s $i ]; then + sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp # this is needed if upgrading from 1.30a or lower - sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i - rm -f $i.tmp - fi - done + sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i + rm -f $i.tmp + fi + done fi %if %{GNOME} @@ -447,25 +447,25 @@ fi umask 077 i=%{_sysconfdir}/%{name}/gnome-console.conf if [ -s %{_sysconfdir}/%{name}/.pw.sed -a -s $i ]; then - sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed - sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp - mv -f $i.tmp $i - rm -f %{_sysconfdir}/%{name}/.upw.sed + sed -e 's/s!\(.*\)!\(.*\)!/s!\2!\1!/' %{_sysconfdir}/%{name}/.pw.sed > %{_sysconfdir}/%{name}/.upw.sed + sed -f %{_sysconfdir}/%{name}/.upw.sed $i > $i.tmp + mv -f $i.tmp $i + rm -f %{_sysconfdir}/%{name}/.upw.sed fi %post console-gnome %update_menus if [ -s %{_sysconfdir}/%{name}/.pw.sed ]; then - for i in %{_sysconfdir}/%{name}/gnome-console.conf %{_sysconfdir}/%{name}/gnome-console.conf.rpmnew %{_sysconfdir}/%{name}/gnome-console.conf.rpmsave; do - if [ -s $i ]; then - sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp + for i in %{_sysconfdir}/%{name}/gnome-console.conf %{_sysconfdir}/%{name}/gnome-console.conf.rpmnew %{_sysconfdir}/%{name}/gnome-console.conf.rpmsave; do + if [ -s $i ]; then + sed -f %{_sysconfdir}/%{name}/.pw.sed $i > $i.tmp # this is needed if upgrading from 1.30a or lower - sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i - rm -f $i.tmp - fi - done + sed -e '/SubSys[[:space:]]*Directory/I d' $i.tmp > $i + rm -f $i.tmp + fi + done fi - + %postun console-gnome %clean_menus diff --git a/bacula/platforms/openbsd/bacula-dir.in b/bacula/platforms/openbsd/bacula-dir.in index e7e76b1618..af7b0c5c1a 100755 --- a/bacula/platforms/openbsd/bacula-dir.in +++ b/bacula/platforms/openbsd/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/openbsd/bacula-fd.in b/bacula/platforms/openbsd/bacula-fd.in index 54f17b9a96..2c41b34325 100755 --- a/bacula/platforms/openbsd/bacula-fd.in +++ b/bacula/platforms/openbsd/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/openbsd/bacula-sd.in b/bacula/platforms/openbsd/bacula-sd.in index fb55fb47cf..9f4e6f0c70 100755 --- a/bacula/platforms/openbsd/bacula-sd.in +++ b/bacula/platforms/openbsd/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/redhat/bacula-dir.in b/bacula/platforms/redhat/bacula-dir.in index 0032b4823f..06038560ea 100755 --- a/bacula/platforms/redhat/bacula-dir.in +++ b/bacula/platforms/redhat/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 92 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/redhat/bacula-fd.in b/bacula/platforms/redhat/bacula-fd.in index c7ff247794..ba9445397c 100755 --- a/bacula/platforms/redhat/bacula-fd.in +++ b/bacula/platforms/redhat/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 91 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/redhat/bacula-sd.in b/bacula/platforms/redhat/bacula-sd.in index 9047785d7d..ab5d8732c7 100755 --- a/bacula/platforms/redhat/bacula-sd.in +++ b/bacula/platforms/redhat/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/rpm/bacula-bat.spec b/bacula/platforms/rpm/bacula-bat.spec index bb84636fea..2c57c6ebaf 100644 --- a/bacula/platforms/rpm/bacula-bat.spec +++ b/bacula/platforms/rpm/bacula-bat.spec @@ -1,12 +1,12 @@ # Bacula RPM spec file # -# Copyright (C) 2000-2010 Free Software Foundation Europe e.V. +# Copyright (C) 2000-2009 Free Software Foundation Europe e.V. # Platform Build Configuration # basic defines for every build %define _release 1 -%define _version 5.0.2 +%define _version 5.0.3 %define depkgs_qt_version 28Jul09 # this is the QT version in depkgs_qt @@ -129,7 +129,7 @@ BuildRequires: freetype-devel %define depkgs_qt ../depkgs-qt # define the basic package description -%define blurb Bacula - It comes by night and sucks the vital essence from your computers. +%define blurb Bacula - The Leading Open Source Backup Solution. %define blurb2 Bacula is a set of computer programs that permit you (or the system %define blurb3 administrator) to manage backup, recovery, and verification of computer %define blurb4 data across a network of computers of different kinds. In technical terms, diff --git a/bacula/platforms/rpm/bacula-docs.spec b/bacula/platforms/rpm/bacula-docs.spec index d148eaad10..e1d22cb610 100644 --- a/bacula/platforms/rpm/bacula-docs.spec +++ b/bacula/platforms/rpm/bacula-docs.spec @@ -1,12 +1,12 @@ # Bacula RPM spec file # -# Copyright (C) 2000-2010 Free Software Foundation Europe e.V. +# Copyright (C) 2000-2009 Free Software Foundation Europe e.V. # Platform Build Configuration # basic defines for every build %define _release 1 -%define _version 5.0.2 +%define _version 5.0.3 %define _packager D. Scott Barninger %define _prefix /usr @@ -41,7 +41,7 @@ Source: %{name}-%{_version}.tar.bz2 %define _docsrc . # define the basic package description -%define blurb Bacula - It comes by night and sucks the vital essence from your computers. +%define blurb Bacula - The Leading Open Source Backup Solution. %define blurb2 Bacula is a set of computer programs that permit you (or the system %define blurb3 administrator) to manage backup, recovery, and verification of computer %define blurb4 data across a network of computers of different kinds. In technical terms, diff --git a/bacula/platforms/rpm/bacula-mtx.spec b/bacula/platforms/rpm/bacula-mtx.spec index f0b488aa7e..81709f5e9c 100644 --- a/bacula/platforms/rpm/bacula-mtx.spec +++ b/bacula/platforms/rpm/bacula-mtx.spec @@ -6,7 +6,7 @@ # basic defines for every build %define _release 1 -%define _version 5.0.2 +%define _version 5.0.3 %define depkgs_version 18Feb09 %define _packager D. Scott Barninger diff --git a/bacula/platforms/slackware/functions.bacula.in b/bacula/platforms/slackware/functions.bacula.in index 11fe45f9f1..f9ef20bb5f 100644 --- a/bacula/platforms/slackware/functions.bacula.in +++ b/bacula/platforms/slackware/functions.bacula.in @@ -1,12 +1,12 @@ #! /bin/sh # # bacula This shell script takes care of starting and stopping -# the bacula daemons. +# the bacula daemons. # # This is pretty much watered down version of the RedHat script # that works on Solaris as well as Linux, but it won't work everywhere. # -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # PSCMD="@PSCMD@" @@ -40,17 +40,17 @@ killproc() { RC=0 # Test syntax. if [ $# = 0 ]; then - echo "Usage: killproc {program} [signal]" - return 1 + echo "Usage: killproc {program} [signal]" + return 1 fi notset=0 # check for third arg to be kill level if [ "$3" != "" ] ; then - killlevel=$3 + killlevel=$3 else - notset=1 - killlevel="-9" + notset=1 + killlevel="-9" fi # Get base program name @@ -61,39 +61,39 @@ killproc() { # Kill it. if [ "$pid" != "" ] ; then - if [ "$notset" = "1" ] ; then - if ps -p $pid>/dev/null 2>&1; then - # TERM first, then KILL if not dead - kill -TERM $pid 2>/dev/null - sleep 1 - if ps -p $pid >/dev/null 2>&1 ; then - sleep 1 - if ps -p $pid >/dev/null 2>&1 ; then - sleep 3 - if ps -p $pid >/dev/null 2>&1 ; then - kill -KILL $pid 2>/dev/null - fi - fi - fi - fi - ps -p $pid >/dev/null 2>&1 - RC=$? - [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown" - # RC=$((! $RC)) - # use specified level only - else - if ps -p $pid >/dev/null 2>&1; then - kill $killlevel $pid 2>/dev/null - RC=$? - [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel" - fi - fi + if [ "$notset" = "1" ] ; then + if ps -p $pid>/dev/null 2>&1; then + # TERM first, then KILL if not dead + kill -TERM $pid 2>/dev/null + sleep 1 + if ps -p $pid >/dev/null 2>&1 ; then + sleep 1 + if ps -p $pid >/dev/null 2>&1 ; then + sleep 3 + if ps -p $pid >/dev/null 2>&1 ; then + kill -KILL $pid 2>/dev/null + fi + fi + fi + fi + ps -p $pid >/dev/null 2>&1 + RC=$? + [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown" + # RC=$((! $RC)) + # use specified level only + else + if ps -p $pid >/dev/null 2>&1; then + kill $killlevel $pid 2>/dev/null + RC=$? + [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel" + fi + fi else - failure "$base shutdown" + failure "$base shutdown" fi # Remove pid file if any. if [ "$notset" = "1" ]; then - rm -f ${PIDDIR}/$base.$2.pid + rm -f ${PIDDIR}/$base.$2.pid fi return $RC } @@ -103,8 +103,8 @@ pidofproc() { pid="" # Test syntax. if [ $# = 0 ] ; then - echo "Usage: pidofproc {program}" - return 1 + echo "Usage: pidofproc {program}" + return 1 fi # Get base program name @@ -112,11 +112,11 @@ pidofproc() { # First try PID file if [ -f ${PIDDIR}/$base.$2.pid ] ; then - pid=`head -1 ${PIDDIR}/$base.$2.pid` - if [ "$pid" != "" ] ; then - echo $pid - return 0 - fi + pid=`head -1 ${PIDDIR}/$base.$2.pid` + if [ "$pid" != "" ] ; then + echo $pid + return 0 + fi fi # Next try "pidof" @@ -136,8 +136,8 @@ pidofproc() { status() { # Test syntax. if [ $# = 0 ] ; then - echo "Usage: status {program}" - return 1 + echo "Usage: status {program}" + return 1 fi # Get base program name @@ -152,27 +152,27 @@ status() { return 0 else pid=`${PSCMD} | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } - { if ((prog == $2) || (("(" prog ")") == $2) || - (("[" prog "]") == $2) || - ((prog ":") == $2)) { print $1 ; exit 0 } }' $1` + { if ((prog == $2) || (("(" prog ")") == $2) || + (("[" prog "]") == $2) || + ((prog ":") == $2)) { print $1 ; exit 0 } }' $1` if [ "$pid" != "" ] ; then - echo "$base (pid $pid) is running..." - return 0 + echo "$base (pid $pid) is running..." + return 0 fi fi # Next try the PID files if [ -f ${PIDDIR}/$base.$2.pid ] ; then - pid=`head -1 ${PIDDIR}/$base.$2.pid` - if [ "$pid" != "" ] ; then - echo "$base not running, but pid file exists" - return 1 - fi + pid=`head -1 ${PIDDIR}/$base.$2.pid` + if [ "$pid" != "" ] ; then + echo "$base not running, but pid file exists" + return 1 + fi fi # See if the subsys lock exists if [ -f ${SUBSYSDIR}/$base ] ; then - echo "$base not running, but subsys locked" - return 2 + echo "$base not running, but subsys locked" + return 2 fi echo "$base is stopped" return 3 @@ -186,4 +186,3 @@ failure() { rc=$? return $rc } - diff --git a/bacula/platforms/slackware/rc.bacula-dir.in b/bacula/platforms/slackware/rc.bacula-dir.in index dcda59307d..3a613a9e7e 100644 --- a/bacula/platforms/slackware/rc.bacula-dir.in +++ b/bacula/platforms/slackware/rc.bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 92 99 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # @@ -14,7 +14,7 @@ case "$1" in start) - [ -x ${BACDIRBIN}/bacula-dir ] && { + [ -x ${BACDIRBIN}/bacula-dir ] && { sleep 2 echo -n "Starting the Director daemon: " OPTIONS='' @@ -27,27 +27,27 @@ case "$1" in fi ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf - echo Done. - } - ;; + echo Done. + } + ;; stop) - [ -x ${BACDIRBIN}/bacula-dir ] && { + [ -x ${BACDIRBIN}/bacula-dir ] && { echo -n "Stopping the Director daemon: " killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT} - echo Done. - } - ;; + echo Done. + } + ;; restart) - $0 stop - sleep 5 - $0 start - ;; + $0 stop + sleep 5 + $0 start + ;; status) - [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT} - ;; + [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT} + ;; *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; esac exit 0 diff --git a/bacula/platforms/slackware/rc.bacula-fd.in b/bacula/platforms/slackware/rc.bacula-fd.in index 338b2cc4d1..99a3c2db95 100644 --- a/bacula/platforms/slackware/rc.bacula-fd.in +++ b/bacula/platforms/slackware/rc.bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 91 99 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # @@ -14,7 +14,7 @@ case "$1" in start) - [ -x ${BACFDBIN}/bacula-fd ] && { + [ -x ${BACFDBIN}/bacula-fd ] && { sleep 2 echo -n "Starting the File daemon: " OPTIONS='' @@ -27,28 +27,27 @@ case "$1" in fi ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf - echo Done. - } - ;; + echo Done. + } + ;; stop) - [ -x ${BACFDBIN}/bacula-fd ] && { + [ -x ${BACFDBIN}/bacula-fd ] && { echo -n "Stopping the File daemon: " killproc ${BACFDBIN}/bacula-fd ${FD_PORT} - echo Done. - } - ;; + echo Done. + } + ;; restart) - $0 stop - sleep 5 - $0 start - ;; + $0 stop + sleep 5 + $0 start + ;; status) - [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT} - ;; + [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT} + ;; *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; esac exit 0 - diff --git a/bacula/platforms/slackware/rc.bacula-sd.in b/bacula/platforms/slackware/rc.bacula-sd.in index 5dbc707eec..9c77a6ab7e 100644 --- a/bacula/platforms/slackware/rc.bacula-sd.in +++ b/bacula/platforms/slackware/rc.bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 99 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # @@ -14,7 +14,7 @@ case "$1" in start) - [ -x ${BACSDBIN}/bacula-sd ] && { + [ -x ${BACSDBIN}/bacula-sd ] && { sleep 2 echo -n "Starting the Storage daemon: " OPTIONS='' @@ -27,29 +27,28 @@ case "$1" in fi ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf - echo Done. - } - ;; + echo Done. + } + ;; stop) - [ -x ${BACSDBIN}/bacula-sd ] && { + [ -x ${BACSDBIN}/bacula-sd ] && { echo -n "Stopping the Storage daemon: " killproc ${BACSDBIN}/bacula-sd ${SD_PORT} - echo Done. - } - ;; + echo Done. + } + ;; restart) - $0 stop - sleep 5 - $0 start - ;; + $0 stop + sleep 5 + $0 start + ;; status) - [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT} - ;; + [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT} + ;; *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; esac exit 0 - diff --git a/bacula/platforms/solaris/bacula-dir.in b/bacula/platforms/solaris/bacula-dir.in index 0563e44c0d..f34e672bcb 100755 --- a/bacula/platforms/solaris/bacula-dir.in +++ b/bacula/platforms/solaris/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 92 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/solaris/bacula-fd.in b/bacula/platforms/solaris/bacula-fd.in index 018dfe48d4..cd3bef1a37 100755 --- a/bacula/platforms/solaris/bacula-fd.in +++ b/bacula/platforms/solaris/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 91 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/solaris/bacula-sd.in b/bacula/platforms/solaris/bacula-sd.in index 9544f4918d..6a0adb80a9 100755 --- a/bacula/platforms/solaris/bacula-sd.in +++ b/bacula/platforms/solaris/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/solaris/pkginfo b/bacula/platforms/solaris/pkginfo index 006321361a..882566364e 100644 --- a/bacula/platforms/solaris/pkginfo +++ b/bacula/platforms/solaris/pkginfo @@ -4,7 +4,7 @@ ARCH=sparc VERSION=2.2.5 MAXINST=1 CATEGORY=application -DESC=Bacula - It comes by night and sucks the essence from your computers +DESC=Bacula - The Leading Open Source Backup Solution. VENDOR=http://www.bacula.org HOTLINE=none EMAIL=christian.masopust@siemens.com diff --git a/bacula/platforms/suse/bacula-dir.in b/bacula/platforms/suse/bacula-dir.in index 546ff5be40..5402a0de16 100755 --- a/bacula/platforms/suse/bacula-dir.in +++ b/bacula/platforms/suse/bacula-dir.in @@ -4,7 +4,7 @@ # the bacula Director daemon # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # Modified to work on SuSE 1/31/2004 D. Scott Barninger diff --git a/bacula/platforms/suse/bacula-fd.in b/bacula/platforms/suse/bacula-fd.in index 5c9b17f7a4..c14dd2e9c1 100755 --- a/bacula/platforms/suse/bacula-fd.in +++ b/bacula/platforms/suse/bacula-fd.in @@ -4,7 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # Modified to work on SuSE 1/31/2004 D. Scott Barninger diff --git a/bacula/platforms/suse/bacula-sd.in b/bacula/platforms/suse/bacula-sd.in index 12838171a6..d2b3afd540 100755 --- a/bacula/platforms/suse/bacula-sd.in +++ b/bacula/platforms/suse/bacula-sd.in @@ -4,7 +4,7 @@ # the bacula Storage daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # Modified to work on SuSE 1/31/2004 D. Scott Barninger diff --git a/bacula/platforms/suse/bacula.in b/bacula/platforms/suse/bacula.in index e8d344dc9b..6907794ac2 100644 --- a/bacula/platforms/suse/bacula.in +++ b/bacula/platforms/suse/bacula.in @@ -9,7 +9,7 @@ # Submitted by Volker Sauer 21Feb04 # Tweaked a bit by Kern to convert it to a .in file # -# description: It comes by night and sucks the vital essence from your computers. +# description: The Leading Open Source Backup Solution. # ### BEGIN INIT INFO # Provides: bacula