initscripts fixes (#629697)
This commit is contained in:
parent
1b1f00fca6
commit
e51227f6cf
@ -25,12 +25,20 @@ prog="bacula-dir"
|
|||||||
CONFIG="/etc/bacula/bacula-dir.conf"
|
CONFIG="/etc/bacula/bacula-dir.conf"
|
||||||
OPTS="-c $CONFIG"
|
OPTS="-c $CONFIG"
|
||||||
|
|
||||||
|
if [ "$DIR_USER" != '' ]; then
|
||||||
|
OPTS="$OPTS -u $DIR_USER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DIR_GROUP" != '' ]; then
|
||||||
|
OPTS="$OPTS -g $DIR_GROUP"
|
||||||
|
fi
|
||||||
|
|
||||||
checkconf() {
|
checkconf() {
|
||||||
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Program has not been configured"
|
echo -n "Error: Default password in config"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
|
5
bacula-dir.sysconfig
Normal file
5
bacula-dir.sysconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# User and group for bacula director
|
||||||
|
# If no user is set bacula will run as root
|
||||||
|
|
||||||
|
DIR_USER=bacula
|
||||||
|
DIR_GROUP=bacula
|
@ -25,12 +25,20 @@ prog="bacula-fd"
|
|||||||
CONFIG="/etc/bacula/bacula-fd.conf"
|
CONFIG="/etc/bacula/bacula-fd.conf"
|
||||||
OPTS="-c $CONFIG"
|
OPTS="-c $CONFIG"
|
||||||
|
|
||||||
|
if [ "$FD_USER" != '' ]; then
|
||||||
|
OPTS="$OPTS -u $FD_USER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$FD_GROUP" != '' ]; then
|
||||||
|
OPTS="$OPTS -g $FD_GROUP"
|
||||||
|
fi
|
||||||
|
|
||||||
checkconf() {
|
checkconf() {
|
||||||
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '_PASSWORD@@' $CONFIG
|
grep -q '_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Program has not been configured"
|
echo -n "Error: Default password in config"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
|
5
bacula-fd.sysconfig
Normal file
5
bacula-fd.sysconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# User and group for bacula client
|
||||||
|
# If no user is set bacula will run as root
|
||||||
|
|
||||||
|
FD_USER=root
|
||||||
|
FD_GROUP=root
|
@ -24,12 +24,20 @@ prog="bacula-sd"
|
|||||||
CONFIG="/etc/bacula/bacula-sd.conf"
|
CONFIG="/etc/bacula/bacula-sd.conf"
|
||||||
OPTS="-c $CONFIG"
|
OPTS="-c $CONFIG"
|
||||||
|
|
||||||
|
if [ "$SD_USER" != '' ]; then
|
||||||
|
OPTS="$OPTS -u $SD_USER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SD_GROUP" != '' ]; then
|
||||||
|
OPTS="$OPTS -g $SD_GROUP"
|
||||||
|
fi
|
||||||
|
|
||||||
checkconf() {
|
checkconf() {
|
||||||
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
# Check if we still have our @@PLACEHOLDERS@@ in the config.
|
||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Program has not been configured"
|
echo -n "Error: Default password in config"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
|
5
bacula-sd.sysconfig
Normal file
5
bacula-sd.sysconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Users for bacula storage
|
||||||
|
# If no user is set bacula will run as root
|
||||||
|
|
||||||
|
SD_USER=bacula
|
||||||
|
SD_GROUP=disk
|
20
bacula.spec
20
bacula.spec
@ -8,7 +8,7 @@
|
|||||||
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
|
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
|
||||||
Name: bacula
|
Name: bacula
|
||||||
Version: 5.0.3
|
Version: 5.0.3
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
# See LICENSE for details
|
# See LICENSE for details
|
||||||
License: GPLv2 with exceptions
|
License: GPLv2 with exceptions
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -27,6 +27,9 @@ Source9: bacula-sd.init
|
|||||||
Source12: bacula-bat.desktop
|
Source12: bacula-bat.desktop
|
||||||
Source13: bacula-traymonitor.console_apps
|
Source13: bacula-traymonitor.console_apps
|
||||||
Source14: bacula-wxconsole.console_apps
|
Source14: bacula-wxconsole.console_apps
|
||||||
|
Source15: bacula-fd.sysconfig
|
||||||
|
Source16: bacula-dir.sysconfig
|
||||||
|
Source17: bacula-sd.sysconfig
|
||||||
Patch0: bacula-director-configuration.patch
|
Patch0: bacula-director-configuration.patch
|
||||||
Patch1: bacula-config.patch
|
Patch1: bacula-config.patch
|
||||||
#Patch2: bacula-wxconsole.patch
|
#Patch2: bacula-wxconsole.patch
|
||||||
@ -394,7 +397,7 @@ export QMAKE=/usr/bin/qmake-qt4
|
|||||||
--with-dir-user=bacula \
|
--with-dir-user=bacula \
|
||||||
--with-dir-group=bacula \
|
--with-dir-group=bacula \
|
||||||
--with-sd-user=bacula \
|
--with-sd-user=bacula \
|
||||||
--with-sd-group=bacula \
|
--with-sd-group=disk \
|
||||||
--with-fd-user=root \
|
--with-fd-user=root \
|
||||||
--with-fd-group=root \
|
--with-fd-group=root \
|
||||||
--with-dir-password=@@DIR_PASSWORD@@ \
|
--with-dir-password=@@DIR_PASSWORD@@ \
|
||||||
@ -611,6 +614,12 @@ install -m 755 -D %{SOURCE8} %{buildroot}%{_initrddir}/bacula-dir
|
|||||||
install -m 755 -D %{SOURCE9} %{buildroot}%{_initrddir}/bacula-sd
|
install -m 755 -D %{SOURCE9} %{buildroot}%{_initrddir}/bacula-sd
|
||||||
|
|
||||||
|
|
||||||
|
# Sysconfig
|
||||||
|
install -m 644 -D %{SOURCE15} %{buildroot}%{_sysconfdir}/sysconfig/bacula-fd
|
||||||
|
install -m 644 -D %{SOURCE16} %{buildroot}%{_sysconfdir}/sysconfig/bacula-dir
|
||||||
|
install -m 644 -D %{SOURCE17} %{buildroot}%{_sysconfdir}/sysconfig/bacula-sd
|
||||||
|
|
||||||
|
|
||||||
# Wipe backup files from the multiple make install calls
|
# Wipe backup files from the multiple make install calls
|
||||||
rm -vf %{buildroot}%{_sysconfdir}/bacula/*.{new,old}
|
rm -vf %{buildroot}%{_sysconfdir}/bacula/*.{new,old}
|
||||||
rm -vf %{buildroot}%{_libexecdir}/bacula/*.{new,old}
|
rm -vf %{buildroot}%{_libexecdir}/bacula/*.{new,old}
|
||||||
@ -810,6 +819,7 @@ fi
|
|||||||
%{_sbindir}/bacula-fd
|
%{_sbindir}/bacula-fd
|
||||||
%{_initrddir}/bacula-fd
|
%{_initrddir}/bacula-fd
|
||||||
%config(noreplace) %{_sysconfdir}/bacula/bacula-fd.conf
|
%config(noreplace) %{_sysconfdir}/bacula/bacula-fd.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-fd
|
||||||
%{_mandir}/man8/bacula-fd.8*
|
%{_mandir}/man8/bacula-fd.8*
|
||||||
|
|
||||||
|
|
||||||
@ -864,6 +874,7 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/bacula/query.sql
|
%config(noreplace) %{_sysconfdir}/bacula/query.sql
|
||||||
%config %{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
|
%config %{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
|
||||||
%config %{_sysconfdir}/logwatch/conf/services/bacula.conf
|
%config %{_sysconfdir}/logwatch/conf/services/bacula.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-dir
|
||||||
%{_sysconfdir}/logwatch/scripts/services/bacula
|
%{_sysconfdir}/logwatch/scripts/services/bacula
|
||||||
%{_sysconfdir}/logwatch/scripts/shared/applybaculadate
|
%{_sysconfdir}/logwatch/scripts/shared/applybaculadate
|
||||||
%{_initrddir}/bacula-dir
|
%{_initrddir}/bacula-dir
|
||||||
@ -940,6 +951,7 @@ fi
|
|||||||
%{_sbindir}/bls
|
%{_sbindir}/bls
|
||||||
%{_sbindir}/btape
|
%{_sbindir}/btape
|
||||||
%config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf
|
%config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-sd
|
||||||
%{_initrddir}/bacula-sd
|
%{_initrddir}/bacula-sd
|
||||||
%{_libexecdir}/bacula/disk-changer
|
%{_libexecdir}/bacula/disk-changer
|
||||||
%{_libexecdir}/bacula/dvd-handler
|
%{_libexecdir}/bacula/dvd-handler
|
||||||
@ -1006,6 +1018,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 19 2010 Jan Görig <jgorig@redhat.com> - 5.0.3-4
|
||||||
|
- Fixed initscripts and changed default group of bacula-sd (#629697)
|
||||||
|
- Better warning for non-configured password (#556669)
|
||||||
|
|
||||||
* Wed Sep 29 2010 jkeating - 5.0.3-3
|
* Wed Sep 29 2010 jkeating - 5.0.3-3
|
||||||
- Rebuilt for gcc bug 634757
|
- Rebuilt for gcc bug 634757
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user