wok annotate open-vm-tools/stuff/vmtoolsd @ rev 20970
updated glew (1.5.8 -> 2.1.0)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 05 15:56:30 2019 +0100 (2019-03-05) |
parents | 995a8662f5ad |
children |
rev | line source |
---|---|
nneul@18391 | 1 #!/bin/sh |
al@19159 | 2 # /etc/init.d/vmtoolsd : Start, stop and restart Open VM Tools daemon on SliTaz, at |
nneul@18391 | 3 # boot time or with the command line. |
nneul@18391 | 4 # |
nneul@18391 | 5 # To start VMTools daemon at boot time, just put vmtoolsd in the $RUN_DAEMONS |
nneul@18391 | 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf |
nneul@18391 | 7 # |
nneul@18391 | 8 . /etc/init.d/rc.functions |
nneul@18391 | 9 . /etc/daemons.conf |
nneul@18391 | 10 |
nneul@18391 | 11 NAME=VMTools |
al@19159 | 12 DESC="$(_ '%s daemon' VMTools)" |
nneul@18391 | 13 DAEMON=/usr/bin/vmtoolsd |
nneul@18391 | 14 PIDFILE=/var/run/vmtoolsd.pid |
nneul@18391 | 15 OPTIONS="-b $PIDFILE" |
nneul@18391 | 16 |
nneul@18391 | 17 case "$1" in |
nneul@18391 | 18 start) |
nneul@18391 | 19 if active_pidfile $PIDFILE vmtoolsd ; then |
al@19159 | 20 _ '%s is already running.' $NAME |
nneul@18391 | 21 exit 1 |
nneul@18391 | 22 fi |
al@19159 | 23 action 'Starting %s: %s...' "$DESC" $NAME |
nneul@18391 | 24 modprobe vmblock |
nneul@18391 | 25 modprobe vmhgfs |
nneul@18391 | 26 modprobe vmci |
nneul@18391 | 27 modprobe vmsync |
nneul@18391 | 28 modprobe vsock |
nneul@18391 | 29 $DAEMON $OPTIONS |
nneul@18391 | 30 status |
nneul@18391 | 31 ;; |
nneul@18391 | 32 stop) |
nneul@18391 | 33 if ! active_pidfile $PIDFILE vmtoolsd ; then |
al@19159 | 34 _ '%s is not running.' $NAME |
nneul@18391 | 35 exit 1 |
nneul@18391 | 36 fi |
al@19159 | 37 action 'Stopping %s: %s...' "$DESC" $NAME |
nneul@18391 | 38 kill `cat $PIDFILE` |
nneul@18391 | 39 status |
nneul@18391 | 40 ;; |
nneul@18391 | 41 restart) |
nneul@18391 | 42 if ! active_pidfile $PIDFILE vmtoolsd ; then |
al@19159 | 43 _ '%s is not running.' $NAME |
nneul@18391 | 44 exit 1 |
nneul@18391 | 45 fi |
al@19159 | 46 action 'Restarting %s: %s...' "$DESC" $NAME |
al@19159 | 47 kill $(cat $PIDFILE) |
nneul@18391 | 48 sleep 2 |
nneul@18391 | 49 $DAEMON $OPTIONS |
nneul@18391 | 50 status |
nneul@18391 | 51 ;; |
nneul@18391 | 52 *) |
al@19159 | 53 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" |
al@19159 | 54 newline |
nneul@18391 | 55 exit 1 |
nneul@18391 | 56 ;; |
nneul@18391 | 57 esac |
nneul@18391 | 58 |
nneul@18391 | 59 exit 0 |
nneul@18391 | 60 |