From: Russ Allbery Date: Sat, 10 Sep 2005 02:46:27 +0000 (+0000) Subject: * Set PATH in the init script, just in case. X-Git-Tag: debian/1.4rc4-1~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=943a5043bd456122b07b2480576bf03905d7b982;p=packages%2Fo%2Fopenafs.git * Set PATH in the init script, just in case. Also use /sbin/runlevel to find the run level rather than relying on the environment variable, since the latter isn't always set. --- diff --git a/debian/changelog b/debian/changelog index 034e81b03..844595949 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ openafs (1.4rc3-1) unstable; urgency=low * Remove the init script check of the cache file system and instead improve the check in afsd. The init script check used stat, which is in /usr/bin and therefore not fair game for init scripts. + * Set PATH in the init script, just in case. * libpam-openafs-kaserver must depend on openafs-client, not just recommend it, since acquiring tokens requires that the client be running. diff --git a/debian/openafs-client.init b/debian/openafs-client.init index 6461c8239..18d4500e0 100755 --- a/debian/openafs-client.init +++ b/debian/openafs-client.init @@ -12,6 +12,8 @@ # The upstream init script assumes Red Hat paths and uses insmod to load the # module directly rather than using modprobe. +PATH=/bin:/usr/bin:/sbin:/usr/sbin + CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo} MODULEDIR=${MODULEDIR:-/lib/modules/`uname -r`/fs} @@ -160,7 +162,8 @@ kill_afs() { # a hope of shutting down cleanly if the system is shutting down. Not enabled # by default. Enable this in /etc/openafs/afs.conf. kill_all_afs() { - if [ "$RUNLEVEL" -eq 0 ] || [ "$RUNLEVEL" -eq 6 ] ; then + runlevel=`runlevel | sed 's/^. //'` + if [ "$runlevel" -eq 0 ] || [ "$runlevel" -eq 6 ] ; then if [ -x /usr/bin/lsof ] ; then echo -n "Killing processes with AFS files open: " kill_afs HUP