diff options
Diffstat (limited to 'meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init')
| -rw-r--r-- | meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init b/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init new file mode 100644 index 0000000000..38280464a7 --- /dev/null +++ b/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # vmtoolsd Start/stop the vmware tools daemon | ||
| 4 | # | ||
| 5 | # chkconfig: 2345 90 60 | ||
| 6 | # description: vmtoolsd is a daemon that starts up. for some reason, it | ||
| 7 | # doesn't include a sysv init startup file in the latest release. | ||
| 8 | # so i have to write this | ||
| 9 | # | ||
| 10 | |||
| 11 | ### BEGIN INIT INFO | ||
| 12 | # Provides: vmtoolsd | ||
| 13 | # Required-Start: $local_fs $syslog | ||
| 14 | # Required-Stop: $local_fs $syslog | ||
| 15 | # Default-Start: 2345 | ||
| 16 | # Default-Stop: 90 | ||
| 17 | # Short-Description: Run vmware tools daemon | ||
| 18 | ### END INIT INFO | ||
| 19 | |||
| 20 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
| 21 | DAEMON=/usr/bin/vmtoolsd | ||
| 22 | NAME=vmtoolsd | ||
| 23 | DESC="vmware tools daemon" | ||
| 24 | VMTOOLSDARGS=" -b /var/run/vmtoolsd.pid " | ||
| 25 | RETVAL="1" | ||
| 26 | |||
| 27 | # source function library | ||
| 28 | . /etc/init.d/functions | ||
| 29 | |||
| 30 | test -f $DAEMON || exit 0 | ||
| 31 | |||
| 32 | |||
| 33 | case "$1" in | ||
| 34 | start) | ||
| 35 | echo -n "Starting vmware tools daemon: " | ||
| 36 | start-stop-daemon --start --quiet --exec $DAEMON -- $VMTOOLSDARGS | ||
| 37 | RETVAL=$? | ||
| 38 | if [ $RETVAL -eq 0 ] ; then | ||
| 39 | echo "OK" | ||
| 40 | else | ||
| 41 | echo "FAIL" | ||
| 42 | fi | ||
| 43 | ;; | ||
| 44 | stop) | ||
| 45 | echo -n "Stopping vmware tools daemon: " | ||
| 46 | start-stop-daemon --stop --quiet --pidfile /var/run/vmtoolsd.pid | ||
| 47 | RETVAL=$? | ||
| 48 | if [ $RETVAL -eq 0 ] ; then | ||
| 49 | echo "OK" | ||
| 50 | else | ||
| 51 | echo "FAIL" | ||
| 52 | fi | ||
| 53 | ;; | ||
| 54 | status) | ||
| 55 | status vmtoolsd | ||
| 56 | exit $? | ||
| 57 | ;; | ||
| 58 | restart) | ||
| 59 | $0 stop && sleep 1 && $0 start | ||
| 60 | ;; | ||
| 61 | *) | ||
| 62 | echo "Usage: /etc/init.d/vmtoolsd {start|stop|status|restart}" | ||
| 63 | exit 1 | ||
| 64 | esac | ||
| 65 | |||
| 66 | exit $RETVAL | ||
