summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/vmware-workstation/files/vmware-workstation.rc')
-rw-r--r--app-emulation/vmware-workstation/files/vmware-workstation.rc50
1 files changed, 31 insertions, 19 deletions
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation.rc b/app-emulation/vmware-workstation/files/vmware-workstation.rc
index f201729fe833..a4bd89a3c5bb 100644
--- a/app-emulation/vmware-workstation/files/vmware-workstation.rc
+++ b/app-emulation/vmware-workstation/files/vmware-workstation.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-workstation.rc,v 1.5 2007/09/16 15:30:58 ikelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-workstation.rc,v 1.6 2007/11/25 12:50:32 ikelos Exp $
depend() {
need localmount
@@ -16,59 +16,71 @@ vmware_prettify() {
msgtype=0
while read line
do
- [ "$line" = "" ] && continue
+ [ "${line}" = "" ] && continue
if [ ${msgtype} -le 0 ]
then
if [ ${msgtype} -eq -1 ]
then
- ewarn $line
+ ewarn ${line}
continue
fi
- if echo ${line} | fgrep -q :
- then
- einfon $line
+ case ${line} in
+ *:*)
+ einfon ${line}
echo
eend 0
- msgtype=1
- else
- ewarn $line
+ msgtype=1;;
+ *)
+ ewarn ${line}
msgtype=-1
- waserror=1
- fi
+ waserror=1;;
+ esac
continue
fi
# Strip out anything after the <esc> code
- message=`echo $line | sed -e "s/^\(.*\).*$/\1/"`
- einfon " $message"
+ message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " ${message}"
echo
echo ${line} | grep -q done
status=$?
- eend $status
+ eend ${status}
- if [ $status -eq 0 ]
+ if [ ${status} -eq 0 ]
then
- logger -p local0.err -t vmware-${state} "$line"
- waserror=$status
+ logger -p local0.err -t vmware-${state} "${line}"
+ waserror=${status}
fi
done
- if [ "$msgtype" = "-1" ]
+ if [ "${msgtype}" = "-1" ]
then
eend 1 "VMware is not properly configured! See above."
fi
- return $waserror
+ return ${waserror}
}
start() {
test -x /etc/vmware/init.d/vmware || \
eend 1 "vmware init script not found. Aborting" || return 1
+ if modinfo vmblock > /dev/null 2>&1;
+ then
+ ebegin "Loading vmblock for drag and drop support"
+ local result
+ modprobe vmblock || eend 1 "Failed to load vmblock driver"
+ test ! -e /tmp/VMwareDnD && mkdir /tmp/VMwareDnD
+ chmod 1777 /tmp/VMwareDnD
+ mount -t vmblock none /proc/fs/vmblock/mountPoint || eend 1 "Failed to mount the vmblock filesystem"
+ eend 0
+ fi
+
/etc/vmware/init.d/vmware start | vmware_prettify start
return $?
}
stop() {
+ umount /proc/fs/vmblock/mountPoint > /dev/null 2>&1
/etc/vmware/init.d/vmware stop | vmware_prettify stop
return $?
}