Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
cobbler
fix-initscript.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-initscript.dif of Package cobbler
--- config/cobblerd +++ config/cobblerd 2012/04/19 08:55:40 @@ -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,33 @@ start() { echo -n $"Starting cobbler daemon: " + # Change the SECRET_KEY option in the Django settings.py file + # required for security reasons, should be unique on all systems + # the default is empty -> SECRET_KEY = '' + # such a key will be changed now + # (moved from the post-section of the RPM to the init-script for appliances) + RAND_SECRET=$(openssl rand -base64 40 | sed 's/\//\\\//g') + sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/web/settings.py + 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 +92,7 @@ fi RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch $LOCKFILE + [ $RETVAL -eq 0 ] && [ -f $DEBIAN_VERSION ] && touch $LOCKFILE return $RETVAL } @@ -91,7 +117,9 @@ 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 +139,7 @@ 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 +154,7 @@ fi ;; condrestart) - [ -f $LOCKFILE ] && restart || : + [ -f $DEBIAN_VERSION ] && [ -f $LOCKFILE ] && restart || : ;; reload) echo "can't reload configuration, you have to restart it"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor