]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Set PATH in the init script, just in case.
authorRuss Allbery <rra@debian.org>
Sat, 10 Sep 2005 02:46:27 +0000 (02:46 +0000)
committerRuss Allbery <rra@debian.org>
Sat, 10 Sep 2005 02:46:27 +0000 (02:46 +0000)
Also use /sbin/runlevel to find the run level rather than relying on
the environment variable, since the latter isn't always set.

debian/changelog
debian/openafs-client.init

index 034e81b0389b5c06144d7c5b3c2405290803a08e..84459594970bb46e1c96c7c38a45746a4c5b66d6 100644 (file)
@@ -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.
index 6461c82394cd40cf0300d8d4effa21f3729700b3..18d4500e077458e27d6e41688fbcc43c8546f5be 100755 (executable)
@@ -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