source: trunk/debathena/debathena/debathena-afuse-automounter/debian/debathena-afuse-automounter.init @ 22962

Revision 22962, 1.1 KB checked in by tabbott, 16 years ago (diff)
In debathena-afuse-automounter: * Fix the path to the unmount code (apparently, afuse in lenny doesn't ignore this)
Line 
1#! /bin/sh -e
2### BEGIN INIT INFO
3# Provides:             debathena-afuse-automounter
4# Required-Start:       openafs-client
5# Required-Stop:        openafs-client
6# Should-Start:         $local_fs $network
7# Default-Start:        2 3 4 5
8# Default-Stop:         0 1 6
9# Short-Description:    Debathena /mit afuse-based automounter
10# Description:          Automounts /mit/locker to point to AFS using Hesiod lookups.
11### END INIT INFO
12
13NAME=debathena-afuse-automounter
14COMMAND='afuse /mit -o mount_template="/usr/lib/debathena-afuse-automounter/mount %m %r" -o unmount_template="/usr/lib/debathena-afuse-automounter/unmount %m %r" -o allow_other'
15case "$1" in
16  start)
17        modprobe fuse
18        mkdir -p /mit
19        eval $COMMAND
20        ;;
21  stop)
22        # afuse doesn't quite support start-stop-daemon, but we can approximate.
23        if pgrep -xf "$(echo $COMMAND | sed 's/\"//g')" >/dev/null; then
24            fusermount -z -u /mit
25        else
26            echo "afuse automounter for /mit not running" >&2
27        fi
28        ;;
29  force-reload|restart)
30        "$0" stop
31        "$0" start
32        ;;
33  *)
34        N=/etc/init.d/$NAME
35        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
36        echo "Usage: $N {start|stop|restart|force-reload}" >&2
37        exit 1
38        ;;
39esac
40
41exit 0
Note: See TracBrowser for help on using the repository browser.