File fix-initscript.dif of Package cobbler
Index: config/cobblerd
===================================================================
--- config/cobblerd.orig
+++ config/cobblerd
@@ -7,8 +7,9 @@
### BEGIN INIT INFO
# Provides: cobblerd
-# Required-Start: $network $xinetd $httpd
-# Default-Start: 3 4 5
+# Required-Start: $syslog $local_fs $network $remote_fs apache2
+# Required-Stop: $syslog $local_fs $network $remote_fs apache2
+# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon that a provides remote cobbler API
@@ -50,8 +51,26 @@ RETVAL=0
start() {
echo -n $"Starting cobbler daemon: "
+ if ! grep '\[tftpd\]' /etc/cobbler/modules.conf > /dev/null 2>&1; then
+ echo
+ echo "no [tftpd] section found in /etc/cobbler/modules.conf"
+ echo "please update your configuration on base of /etc/cobbler/modules.conf.rpmnew"
+ RETVAL=1
+ return $RETVAL
+ fi
if [ -f $SUSE_RELEASE ]; then
- startproc -f -p /var/run/$SERVICE.pid /usr/bin/cobblerd $CONFIG_ARGS
+ if [ -e /etc/apache2/conf.d/cobbler.conf.rpmnew ]; then
+ echo
+ echo "there is a /etc/apache2/conf.d/cobbler.conf.rpmnew file."
+ echo "you should check that for changes against your /etc/apache2/conf.d/cobbler.conf"
+ fi
+ if [ -e /etc/apache2/vhosts.d/cobbler_web.conf.rpmnew ]; then
+ echo
+ echo "there is a /etc/apache2/vhosts.d/cobbler_web.conf.rpmnew file."
+ echo "you should check that for changes against your /etc/apache2/vhosts.d/cobbler_web.conf"
+ fi
+
+ startproc -p /var/run/$SERVICE.pid /usr/bin/cobblerd $CONFIG_ARGS
rc_status -v
elif [ -e $DEBIAN_VERSION ]; then
if [ -f $LOCKFILE ]; then
@@ -66,7 +85,7 @@ start() {
fi
RETVAL=$?
echo
- [ $RETVAL -eq 0 ] && touch $LOCKFILE
+ [ $RETVAL -eq 0 ] && [ -f $DEBIAN_VERSION ] && touch $LOCKFILE
return $RETVAL
}
@@ -91,7 +110,9 @@ stop() {
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
- rm -f $LOCKFILE
+ if [ -f $DEBIAN_VERSION ]; then
+ rm -f $LOCKFILE
+ fi
rm -f /var/run/$SERVICE.pid
fi
}
@@ -111,6 +132,7 @@ case "$1" in
echo -n "Checking for service cobblerd "
checkproc /usr/bin/cobblerd
rc_status -v
+ RETVAL=$?
elif [ -f $DEBIAN_VERSION ]; then
if [ -f $LOCKFILE ]; then
RETVAL=0
@@ -125,7 +147,7 @@ case "$1" in
fi
;;
condrestart)
- [ -f $LOCKFILE ] && restart || :
+ [ -f $DEBIAN_VERSION ] && [ -f $LOCKFILE ] && restart || :
;;
reload)
echo "can't reload configuration, you have to restart it"