From 21ba77c8f29d1caf45eeb49a731ee8fbfc224052 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 30 Jul 2010 15:41:34 -0700 Subject: [PATCH] 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. --- debian/changelog | 9 +++++++++ debian/openafs-fileserver.init | 31 ++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8b53f367c..451a0286d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +openafs (1.5.75-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, 27 Aug 2010 19:15:56 -0700 + openafs (1.5.75-2) experimental; urgency=low * Apply upstream deltas: 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 -- 2.39.5