wok view autofs/stuff/etc/init.d/autofs @ rev 16800

Up pcmanfm (1.2.1)
author Paul Issott <paul@slitaz.org>
date Fri Jul 04 18:11:47 2014 +0100 (2014-07-04)
parents
children 7f188676b59c
line source
1 #!/bin/sh
2 # /etc/init.d/autofs : Start, stop and restart automounter on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start automounter at boot time, just put dropbear in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=Automount
12 DESC="Automount server"
13 DAEMON=/usr/sbin/automount
14 OPTIONS=$AUTOMOUNT_OPTIONS
15 PIDFILE=/var/run/automount.pid
17 case "$1" in
18 start)
19 if active_pidfile $PIDFILE automount ; then
20 echo "$NAME already running."
21 exit 1
22 fi
23 echo -n "Starting $DESC: $NAME... "
24 modprobe autofs4
25 $DAEMON $OPTIONS
26 status
27 ;;
28 stop)
29 if ! active_pidfile $PIDFILE automount ; then
30 echo "$NAME is not running."
31 exit 1
32 fi
33 echo -n "Stopping $DESC: $NAME... "
34 kill `cat $PIDFILE`
35 rmmod autofs4
36 status
37 ;;
38 restart)
39 if ! active_pidfile $PIDFILE automount ; then
40 echo "$NAME is not running."
41 exit 1
42 fi
43 echo -n "Restarting $DESC: $NAME... "
44 kill `cat $PIDFILE`
45 sleep 2
46 $DAEMON $OPTIONS
47 status
48 ;;
49 *)
50 echo ""
51 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
52 echo ""
53 exit 1
54 ;;
55 esac
57 exit 0