###########################################################################################
# script configuration section
-VERSION=2.0.2
+VERSION=2.2.0
RELEASE=1
# build platform for spec
-# set to one of rh7,rh8,rh9,fc1,fc3,fc4,fc5,fc6,wb3,rhel3,rhel4,centos3,centos4,su9,su10,su102,mdk,mdv
-PLATFORM=su10
+# set to one of rh7,rh8,rh9,fc1,fc3,fc4,fc5,fc6,wb3,rhel3,rhel4,centos3,centos4,sl3, sl4,su9,su10,su102,mdk,mdv
+PLATFORM=su102
# platform designator for file names
# for RedHat/Fedora set to one of rh7,rh8,rh9,fc1,fc3,fc4,fc5,fc6 OR
-# for RHEL3/clones wb3, rhel3 & centos3 set to el3 OR
-# for RHEL4/clones rhel4 & centos4 set to el4 OR
+# for RHEL3/clones wb3, rhel3, sl3 & centos3 set to el3 OR
+# for RHEL4/clones rhel4, sl4 & centos4 set to el4 OR
# for SuSE set to su90, su91, su92, su100 or su101 or su102 OR
# for Mandrake set to 101mdk or 20060mdk
-FILENAME=su100
+FILENAME=su102
# MySQL version
# set to empty (for MySQL 3), 4 or 5
-MYSQL=4
+MYSQL=5
# building wxconsole
# set to 1 to build wxconsole package else set 0
WXCONSOLE=0
+# building bat
+# set to 1 to build bat package else set 0
+BAT=0
+
# enter your name and email address here
PACKAGER="Your Name <your-email@site.org>"
echo Building PostgreSQL packages for "$PLATFORM"...
sleep 2
+if [ "$BAT" = "1" ]; then
rpmbuild --rebuild --define "build_${PLATFORM} 1" \
--define "build_postgresql 1" \
--define "contrib_packager ${PACKAGER}" \
--define "build_python 1" \
+--define "build_bat 1" \
--define "nobuild_gconsole 1" ${SRPM}
+else
+rpmbuild --rebuild --define "build_${PLATFORM} 1" \
+--define "build_postgresql 1" \
+--define "contrib_packager ${PACKAGER}" \
+--define "build_python 1" \
+--define "nobuild_gconsole 1" ${SRPM}
+fi
rm -rf ${RPMBUILD}/*
echo Building SQLite packages for "$PLATFORM"...
mv -f ${RPMDIR}/bacula-wxconsole-${VERSION}-${RELEASE}.${ARCH}.rpm \
./bacula-wxconsole-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+mv -f ${RPMDIR}/bacula-bat-${VERSION}-${RELEASE}.${ARCH}.rpm \
+./bacula-bat-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+
# now sign the packages
if [ "$SIGN" = "1" ]; then
echo Ready to sign packages...;
# 06 Aug 2006 add remote source directory, add switch for signing, refine file names
# 19 Aug 2006 add $LANG override to config section per request Felix Schwartz
# 27 Jan 2007 add fc6
+# 29 Apr 2007 add sl3 & sl4 target and bat package
fi
# select build platform
-PLATFORM=`zenity --title "Select Platform" --text "Please choose a build platform." --list --radiolist --column "Select" --column "Platform" False rh7 False rh8 False rh9 False fc1 False fc3 False fc4 False fc5 False fc6 False wb3 False rhel3 False rhel4 False centos3 False centos4 False su9 False su10 False mdk False mdv`
+PLATFORM=`zenity --title "Select Platform" --text "Please choose a build platform." --list --radiolist --column "Select" --column "Platform" False rh7 False rh8 False rh9 False fc1 False fc3 False fc4 False fc5 False fc6 False wb3 False rhel3 False rhel4 False centos3 False centos4 False sl3 False sl4 False su9 False su10 False su102 False mdk False mdv`
RESULT="$?"
if [ "$RESULT" = "1" ];
fi
# select database support
-DATABASE=`zenity --title "Select Database" --text "Please choose database support." --list --radiolist --column "Select" --column "Platform" False sqlite False mysql False mysql4 False mysql5 False postgresql False client_only`
+DATABASE=`zenity --title "Select Database" --text "Please choose database support." --list --radiolist --column "Select" --column "Database" False sqlite False mysql False mysql4 False mysql5 False postgresql False client_only`
RESULT="$?"
if [ "$RESULT" = "1" ];
fi
# select other build options
-OPTIONS=`zenity --title "Select Options" --text "Please choose other options." --list --checklist --column "Select" --column "Platform" False build_wxconsole False nobuild_gconsole False build_x86_64 False build_python`
+OPTIONS=`zenity --title "Select Options" --text "Please choose other options." --list --checklist --column "Select" --column "Other" False build_bat False build_wxconsole False nobuild_gconsole False build_x86_64 False build_python`
RESULT="$?"
if [ "$RESULT" = "1" ];
OPTION2=`echo $OPTIONS|cut --delimiter=\| -f2`
OPTION3=`echo $OPTIONS|cut --delimiter=\| -f3`
OPTION4=`echo $OPTIONS|cut --delimiter=\| -f4`
+OPTION5=`echo $OPTIONS|cut --delimiter=\| -f5`
# construct rpmbuild command
COMMAND="rpmbuild --rebuild --define 'build_$PLATFORM 1' --define 'build_$DATABASE 1' --define 'contrib_packager ${PACKAGER}'"
then
COMMAND="${COMMAND} --define '$OPTION4 1'";
fi
+if [ ! -z $OPTION5 ];
+then
+ COMMAND="${COMMAND} --define '$OPTION5 1'";
+fi
COMMAND="${COMMAND} ${SELECTED_FILE}"
# 30 Jul 2006 initial release
# 05 Aug 2006 add option for build_python
# 27 Jan 2007 add fc6
+# 29 Apr 2007 add sl3 & sl4 target and bat option
%if %{gconsole}
BuildRequires: pkgconfig, pango-devel, atk-devel
%endif
+%if %{bat}
+BuildRequires: qt-devel >= 4
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
server packages.
%endif
+%if %{bat}
+%package bat
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+%endif
+
+%if %{bat} && %{su102}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype2
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat} && %{fc6}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat}
+%description bat
+%{blurb}
+
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
+
+This is the Bacula Administration Tool package. It is an add-on to
+the client or server packages.
+%endif
+
%prep
%setup
%if %{wxconsole}
--enable-bwx-console \
%endif
+%if %{bat}
+ --enable-bat \
+%endif
%if %{python}
--with-python \
%endif
mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
%endif
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
%define usermode_iftrick 1
%else
%define usermode_iftrick 0
cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
%endif
+%if %{bat} && %{su102}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+%endif
%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
%define iftrick 1
%else
cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
%endif
+%if %{bat} && %{iftrick}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
+cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
+ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
+%endif
# install sqlite
%if %{sqlite}
cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
rm -f src/filed/static-bacula-fd
+# install bat since make doesn't at the moment
+%if %{bat}
+cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
+cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
+%endif
+
# now clean up permissions that are left broken by the install
%if ! %{client_only}
chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
fi
%endif
+%if %{bat}
+%files bat
+%defattr(-,root,root)
+/usr/sbin/bat
+%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
+%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
+/usr/share/pixmaps/bat_icon.png
+/usr/share/applications/bat.desktop
+%{_mandir}/man1/bat.1.%{manpage_ext}
+%endif
+
+%if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
+# add the console helper files
+%config(noreplace,missingok) /etc/pam.d/bat
+%config(noreplace,missingok) /etc/security/console.apps/bat
+/usr/bin/bat
+%endif
+
+%if %{bat}
+%pre bat
+# create the daemon group
+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 %{group_file}."
+ echo "See the manual chapter \"Running Bacula\" for details."
+fi
+
+%post bat
+# 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
+ cp -f $file.new $file; rm -f $file.new
+ fi
+ done
+ done
+fi
+%endif
+
%changelog
* Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- 2.1.8
%if %{gconsole}
BuildRequires: pkgconfig, pango-devel, atk-devel
%endif
+%if %{bat}
+BuildRequires: qt-devel >= 4
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
server packages.
%endif
+%if %{bat}
+%package bat
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+%endif
+
+%if %{bat} && %{su102}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype2
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat} && %{fc6}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat}
+%description bat
+%{blurb}
+
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
+
+This is the Bacula Administration Tool package. It is an add-on to
+the client or server packages.
+%endif
+
%prep
%setup
%if %{wxconsole}
--enable-bwx-console \
%endif
+%if %{bat}
+ --enable-bat \
+%endif
%if %{python}
--with-python \
%endif
mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
%endif
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
%define usermode_iftrick 1
%else
%define usermode_iftrick 0
cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
%endif
+%if %{bat} && %{su102}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+%endif
%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
%define iftrick 1
%else
cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
%endif
+%if %{bat} && %{iftrick}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
+cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
+ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
+%endif
# install sqlite
%if %{sqlite}
cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
rm -f src/filed/static-bacula-fd
+# install bat since make doesn't at the moment
+%if %{bat}
+cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
+cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
+%endif
+
# now clean up permissions that are left broken by the install
%if ! %{client_only}
chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
fi
%endif
+%if %{bat}
+%files bat
+%defattr(-,root,root)
+/usr/sbin/bat
+%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
+%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
+/usr/share/pixmaps/bat_icon.png
+/usr/share/applications/bat.desktop
+%{_mandir}/man1/bat.1.%{manpage_ext}
+%endif
+
+%if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
+# add the console helper files
+%config(noreplace,missingok) /etc/pam.d/bat
+%config(noreplace,missingok) /etc/security/console.apps/bat
+/usr/bin/bat
+%endif
+
+%if %{bat}
+%pre bat
+# create the daemon group
+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 %{group_file}."
+ echo "See the manual chapter \"Running Bacula\" for details."
+fi
+
+%post bat
+# 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
+ cp -f $file.new $file; rm -f $file.new
+ fi
+ done
+ done
+fi
+%endif
+
%changelog
* Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- 2.1.8
%if %{gconsole}
BuildRequires: pkgconfig, pango-devel, atk-devel
%endif
+%if %{bat}
+BuildRequires: qt-devel >= 4
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
server packages.
%endif
+%if %{bat}
+%package bat
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+%endif
+
+%if %{bat} && %{su102}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype2
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat} && %{fc6}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat}
+%description bat
+%{blurb}
+
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
+
+This is the Bacula Administration Tool package. It is an add-on to
+the client or server packages.
+%endif
+
%prep
%setup
%if %{wxconsole}
--enable-bwx-console \
%endif
+%if %{bat}
+ --enable-bat \
+%endif
%if %{python}
--with-python \
%endif
mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
%endif
-%if %{gconsole} || %{wxconsole}
+%if %{gconsole} || %{wxconsole} || %{bat}
%define usermode_iftrick 1
%else
%define usermode_iftrick 0
cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
%endif
+%if %{bat} && %{su102}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+%endif
%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
%define iftrick 1
%else
cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
%endif
+%if %{bat} && %{iftrick}
+cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
+cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
+cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
+cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
+ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
+%endif
# install sqlite
%if %{sqlite}
cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
rm -f src/filed/static-bacula-fd
+# install bat since make doesn't at the moment
+%if %{bat}
+cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
+cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
+%endif
+
# now clean up permissions that are left broken by the install
%if ! %{client_only}
chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
fi
%endif
+%if %{bat}
+%files bat
+%defattr(-,root,root)
+/usr/sbin/bat
+%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
+%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
+/usr/share/pixmaps/bat_icon.png
+/usr/share/applications/bat.desktop
+%{_mandir}/man1/bat.1.%{manpage_ext}
+%endif
+
+%if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
+# add the console helper files
+%config(noreplace,missingok) /etc/pam.d/bat
+%config(noreplace,missingok) /etc/security/console.apps/bat
+/usr/bin/bat
+%endif
+
+%if %{bat}
+%pre bat
+# create the daemon group
+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 %{group_file}."
+ echo "See the manual chapter \"Running Bacula\" for details."
+fi
+
+%post bat
+# 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
+ cp -f $file.new $file; rm -f $file.new
+ fi
+ done
+ done
+fi
+%endif
+
%changelog
* Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- 2.1.8