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

updated liblinebreak and liblinebreak-dev (2.0 -> 2.1)
author Hans-G?nter Theisgen
date Tue Mar 10 16:26:23 2020 +0100 (2020-03-10)
parents a6137e640e01
children 6f4496f6c83c
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="$(_ '%s server' Automount)"
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 _ '%s is already running.' $NAME
21 exit 1
22 fi
23 action 'Starting %s: %s...' "$DESC" $NAME
24 modprobe autofs4
25 $DAEMON $OPTIONS
26 status
27 ;;
28 stop)
29 if ! active_pidfile $PIDFILE automount ; then
30 _ '%s is not running.' $NAME
31 exit 1
32 fi
33 action 'Stopping %s: %s...' "$DESC" $NAME
34 kill $(cat $PIDFILE)
35 rmmod autofs4
36 status
37 ;;
38 restart)
39 if ! active_pidfile $PIDFILE automount ; then
40 _ '%s is not running.' $NAME
41 exit 1
42 fi
43 action 'Restarting %s: %s...' "$DESC" $NAME
44 kill $(cat $PIDFILE)
45 sleep 2
46 $DAEMON $OPTIONS
47 status
48 ;;
49 *)
50 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
51 newline
52 exit 1
53 ;;
54 esac
56 exit 0