aboutsummaryrefslogtreecommitdiff
path: root/emulators/vmware-guestd3/files/vmware-guestd.sh
diff options
context:
space:
mode:
authorMakoto Matsushita <matusita@FreeBSD.org>2001-11-11 06:59:28 +0000
committerMakoto Matsushita <matusita@FreeBSD.org>2001-11-11 06:59:28 +0000
commite122c60d144cfc2ab841639ae72790a7e6261772 (patch)
tree24517684f3cca52b13e16af3ef14bc12625d525b /emulators/vmware-guestd3/files/vmware-guestd.sh
parent105fd53f69e43b1143cbcd164cf07898f5d0788e (diff)
downloadports-e122c60d144cfc2ab841639ae72790a7e6261772.tar.gz
ports-e122c60d144cfc2ab841639ae72790a7e6261772.zip
Notes
Diffstat (limited to 'emulators/vmware-guestd3/files/vmware-guestd.sh')
-rw-r--r--emulators/vmware-guestd3/files/vmware-guestd.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/emulators/vmware-guestd3/files/vmware-guestd.sh b/emulators/vmware-guestd3/files/vmware-guestd.sh
new file mode 100644
index 000000000000..c8759cb4ace3
--- /dev/null
+++ b/emulators/vmware-guestd3/files/vmware-guestd.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ exec 2>/dev/null
+ ulimit -c 0
+ if ${PREFIX}/sbin/checkvm >/dev/null; then
+ ${PREFIX}/sbin/vmware-guestd & && echo -n ' vmware-guestd'
+ fi
+ ;;
+stop)
+ exec 2>/dev/null
+ ulimit -c 0
+ if ${PREFIX}/sbin/checkvm >/dev/null; then
+ killall vmware-guestd && echo -n ' vmware-guestd'
+ fi
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0