Author: denis
Update of /cvs/free/rpms/open-vm-tools/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv5051
Modified Files:
open-vm-tools-guestd.init
Log Message:
#382: only start guest daemon on guest VM
Index: open-vm-tools-guestd.init
===================================================================
RCS file: /cvs/free/rpms/open-vm-tools/devel/open-vm-tools-guestd.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- open-vm-tools-guestd.init 30 Jun 2009 10:46:21 -0000 1.2
+++ open-vm-tools-guestd.init 20 Mar 2010 13:54:14 -0000 1.3
@@ -14,6 +14,7 @@
RETVAL=0
prog="vmtoolsd"
+CHECKVM=/usr/bin/vmware-checkvm
GUESTD=/usr/bin/vmtoolsd
PID_FILE=/var/run/vmtoolsd.pid
LOCK_FILE=/var/lock/subsys/vmtoolsd
@@ -42,6 +43,9 @@
start()
{
+ # Check if we are running inside a VM
+ $CHECKVM >/dev/null 2>&1 || return
+
echo -n $"Starting Open-vm-tools guest daemon: "
setup_modules
$GUESTD $OPTIONS && success || failure
@@ -52,6 +56,9 @@
stop()
{
+ # Check if we are running inside a VM
+ $CHECKVM >/dev/null 2>&1 || return
+
echo -n $"Stopping Open-vm-tools guest daemon: "
killall vmware-user 2>/dev/null
unmount_stuff