From: <ke...@us...> - 2009-07-31 06:10:08
|
Revision: 9134 http://bacula.svn.sourceforge.net/bacula/?rev=9134&view=rev Author: kerns Date: 2009-07-31 06:09:56 +0000 (Fri, 31 Jul 2009) Log Message: ----------- Continue work on bacula.spec Modified Paths: -------------- trunk/bacula/platforms/redhat/bacula.spec trunk/bacula/src/version.h Modified: trunk/bacula/platforms/redhat/bacula.spec =================================================================== --- trunk/bacula/platforms/redhat/bacula.spec 2009-07-30 21:38:43 UTC (rev 9133) +++ trunk/bacula/platforms/redhat/bacula.spec 2009-07-31 06:09:56 UTC (rev 9134) @@ -11,7 +11,7 @@ %define docs_version 3.0.2 %define depkgs_version 18Feb09 %define depkgs_qt_version 28Jul09 -%define _packager D. Scott Barninger <bar...@fa...> +%define _packager Kern Sibbald <ke...@si...> %define single_dir 0 %{?single_dir_install:%define single_dir 1} @@ -2278,13 +2278,12 @@ echo "Upgrading bacula database ..." %{script_dir}/update_mysql_tables echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2" - fi %endif %if %{sqlite} # test for an existing database -if [ -s %{working_dir}/bacula.db ]; then +if [ -f %{working_dir}/bacula.db ]; then DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1` # check to see if we need to upgrade a 2.x database if [ "$DB_VER" -lt "11" ] && [ "$DB_VER" -ge "10" ]; then @@ -2337,16 +2336,26 @@ # generate passwords if needed if [ -d %{sysconf_dir} ]; then cd %{sysconf_dir} - for file in *.conf; do for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do - need_password=`grep $string $file 2>/dev/null` - if [ -n "$need_password" ]; then pass=`openssl rand -base64 33` - sed "s-$string-$pass-g" $file > $file.new + for file in *.conf; do + need_password=`grep ${string} $file 2>/dev/null` + if [ -n "$need_password" ]; then + sed "s@${string}@${pass}@g" $file > $file.new cp -f $file.new $file; rm -f $file.new fi done done +# put actual hostname in conf file + host=`hostname` + string="XXX_HOSTNAME_XXX" + for file in *.conf; do + need_host=`grep ${string} $file 2>/dev/null` + if [ -n "$need_host" ]; then + sed "s@${string}@${host}@g" $file >$file.new + cp -f $file.new $file; rm -f $file.new + fi + done fi /sbin/ldconfig %endif @@ -2456,16 +2465,26 @@ # generate passwords if needed if [ -d %{sysconf_dir} ]; then cd %{sysconf_dir} - for file in *.conf; do for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do - need_password=`grep $string $file 2>/dev/null` - if [ -n "$need_password" ]; then pass=`openssl rand -base64 33` - sed "s-$string-$pass-g" $file > $file.new + for file in *.conf; do + need_password=`grep ${string} $file 2>/dev/null` + if [ -n "$need_password" ]; then + sed "s@${string}@${pass}@g" $file > $file.new cp -f $file.new $file; rm -f $file.new fi done done +# put actual hostname in conf file + host=`hostname` + string="XXX_HOSTNAME_XXX" + for file in *.conf; do + need_host=`grep ${string} $file 2>/dev/null` + if [ -n "$need_host" ]; then + sed "s@${string}@${host}@g" $file >$file.new + cp -f $file.new $file; rm -f $file.new + fi + done fi /sbin/ldconfig @@ -2538,16 +2557,26 @@ # generate passwords if needed if [ -d %{sysconf_dir} ]; then cd %{sysconf_dir} - for file in *.conf; do for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do - need_password=`grep $string $file 2>/dev/null` - if [ -n "$need_password" ]; then pass=`openssl rand -base64 33` - sed "s-$string-$pass-g" $file > $file.new + for file in *.conf; do + need_password=`grep ${string} $file 2>/dev/null` + if [ -n "$need_password" ]; then + sed "s@${string}@${pass}@g" $file > $file.new cp -f $file.new $file; rm -f $file.new fi done done +# put actual hostname in conf file + host=`hostname` + string="XXX_HOSTNAME_XXX" + for file in *.conf; do + need_host=`grep ${string} $file 2>/dev/null` + if [ -n "$need_host" ]; then + sed "s@${string}@${host}@g" $file >$file.new + cp -f $file.new $file; rm -f $file.new + fi + done fi %endif @@ -2583,16 +2612,26 @@ # generate passwords if needed if [ -d %{sysconf_dir} ]; then cd %{sysconf_dir} - for file in *.conf; do for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do - need_password=`grep $string $file 2>/dev/null` - if [ -n "$need_password" ]; then pass=`openssl rand -base64 33` - sed "s-$string-$pass-g" $file > $file.new + for file in *.conf; do + need_password=`grep ${string} $file 2>/dev/null` + if [ -n "$need_password" ]; then + sed "s@${string}@${pass}@g" $file > $file.new cp -f $file.new $file; rm -f $file.new fi done done +# put actual hostname in conf file + host=`hostname` + string="XXX_HOSTNAME_XXX" + for file in *.conf; do + need_host=`grep ${string} $file 2>/dev/null` + if [ -n "$need_host" ]; then + sed "s@${string}@${host}@g" $file >$file.new + cp -f $file.new $file; rm -f $file.new + fi + done fi %endif @@ -2628,16 +2667,26 @@ # generate passwords if needed if [ -d %{sysconf_dir} ]; then cd %{sysconf_dir} - for file in *.conf; do for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do - need_password=`grep $string $file 2>/dev/null` - if [ -n "$need_password" ]; then pass=`openssl rand -base64 33` - sed "s-$string-$pass-g" $file > $file.new + for file in *.conf; do + need_password=`grep ${string} $file 2>/dev/null` + if [ -n "$need_password" ]; then + sed "s@${string}@${pass}@g" $file > $file.new cp -f $file.new $file; rm -f $file.new fi done done +# put actual hostname in conf file + host=`hostname` + string="XXX_HOSTNAME_XXX" + for file in *.conf; do + need_host=`grep ${string} $file 2>/dev/null` + if [ -n "$need_host" ]; then + sed "s@${string}@${host}@g" $file >$file.new + cp -f $file.new $file; rm -f $file.new + fi + done fi %endif Modified: trunk/bacula/src/version.h =================================================================== --- trunk/bacula/src/version.h 2009-07-30 21:38:43 UTC (rev 9133) +++ trunk/bacula/src/version.h 2009-07-31 06:09:56 UTC (rev 9134) @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "3.0.3" -#define BDATE "29 July 2009" -#define LSMDATE "29Jul09" +#define BDATE "30 July 2009" +#define LSMDATE "30Jul09" #define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n" #define BYEAR "2009" /* year for copyright messages in progs */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |