From: Russ Allbery Date: Fri, 30 Jul 2010 22:41:34 +0000 (-0700) Subject: openafs-fileserver init script improvements X-Git-Tag: debian/1.4.12.1+dfsg-3~8 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=460b92bc438e90903f6bc768da6b3d027e1859ac;p=packages%2Fo%2Fopenafs.git openafs-fileserver init script improvements * The openafs-fileserver init script now depends on $named since apparently the volserver requires DNS during startup. Thanks, Jaap Winius. (Closes: #589783) * Add a status command to thet openafs-fileserver init script. --- diff --git a/debian/changelog b/debian/changelog index 1d52c09df..decf96ed1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +openafs (1.4.12.1+dfsg-3) UNRELEASED; urgency=low + + * The openafs-fileserver init script now depends on $named since + apparently the volserver requires DNS during startup. Thanks, Jaap + Winius. (Closes: #589783) + * Add a status command to thet openafs-fileserver init script. + + -- Russ Allbery Fri, 30 Jul 2010 15:41:16 -0700 + openafs (1.4.12.1+dfsg-2) unstable; urgency=low * Apply upstream deltas to fix crashes in the file server: diff --git a/debian/openafs-fileserver.init b/debian/openafs-fileserver.init index 5db046378..ea1b41fe8 100755 --- a/debian/openafs-fileserver.init +++ b/debian/openafs-fileserver.init @@ -1,8 +1,8 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: openafs-fileserver -# Required-Start: $local_fs $remote_fs $network $time -# Required-Stop: $local_fs $remote_fs $network +# Required-Start: $remote_fs $network $time $named +# Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: OpenAFS file and database server manager @@ -25,8 +25,10 @@ DAEMON=/usr/sbin/bosserver DAEMON_ARGS="" SCRIPTNAME=/etc/init.d/openafs-fileserver -# Exit if the package is not installed. -[ -x "$DAEMON" ] || exit 0 +# Exit if the package is not installed and we were not given the status option. +if [ ! -x "$DAEMON" ] && [ "status" != "$1" ] ; then + exit 0 +fi # Read configuration if it is present. [ -r /etc/default/openafs-fileserver ] && . /etc/default/openafs-fileserver @@ -109,8 +111,27 @@ case "$1" in esac ;; + status) + start-stop-daemon --start --quiet --startas $DAEMON --name $NAME --test \ + > /dev/null + case "$?" in + 0) + echo "$NAME is not running" + exit 3 + ;; + 1) + echo "$NAME is running" + exit 0 + ;; + *) + log_warning_msg "Cannot determine if $NAME is running" + exit 4 + ;; + esac + ;; + *) - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac