summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/vmware-workstation/files/4.0.4460/vmware')
-rw-r--r--app-emulation/vmware-workstation/files/4.0.4460/vmware73
1 files changed, 73 insertions, 0 deletions
diff --git a/app-emulation/vmware-workstation/files/4.0.4460/vmware b/app-emulation/vmware-workstation/files/4.0.4460/vmware
new file mode 100644
index 000000000000..b7ab7dca7ba0
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/4.0.4460/vmware
@@ -0,0 +1,73 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/4.0.4460/vmware,v 1.1 2003/04/10 15:19:08 prez Exp $
+
+depend() {
+ need localmount
+ use logger net
+}
+
+vmware-prettify() {
+ # Yea, the code is ugly but the output is pretty
+ state=$1
+ waserror=0
+ msgtype=0
+ while read line
+ do
+ [ "$line" == "" ] && continue
+ if [ "$msgtype" -le "0" ]
+ then
+ if [ "$msgtype" == "-1" ]
+ then
+ ewarn $line
+ continue
+ fi
+ if [ "${line/*:*/}" == "" ]
+ then
+ einfon $line
+ echo
+ eend 0
+ msgtype=1
+ else
+ ewarn $line
+ msgtype=-1
+ waserror=1
+ fi
+ continue
+ fi
+
+ # Strip out anything after the <esc> code
+ message=`echo $line | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " $message"
+ echo
+
+ echo $line | grep done > /dev/null
+ status=$?
+ eend $status
+
+ if [ "$status" != "0" ]
+ then
+ logger -p local0.err -t vmware-${state} "$line"
+ waserror=$status
+ fi
+ done
+ if [ "$msgtype" == "-1" ]
+ then
+ eend 1 "VMware is not properly configured! See above."
+ fi
+ return $waserror
+}
+
+start() {
+ test -x /etc/vmware/init.d/vmware || \
+ eend 1 "vmware init script not found. Aborting" || return 1
+
+ /etc/vmware/init.d/vmware start | vmware-prettify start
+ return $?
+}
+
+stop() {
+ /etc/vmware/init.d/vmware stop | vmware-prettify stop
+ return $?
+}