diff options
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm')
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm index e8f40c16..43add481 100644 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm +++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm @@ -33,8 +33,8 @@ sub fillRunlevelScript my $script = unshiftHereDoc(<<" End-of-Here"); #! /bin/sh - # Ubuntu specific start/stop script, generated via stage1 'vmware' plugin - # install + # Ubuntu/Debian specific start/stop script, generated via stage1 'vmware' + # plugin install # inspiration taken from vmware start script: # Copyright 1998-2007 VMware, Inc. All rights reserved. # @@ -50,8 +50,10 @@ sub fillRunlevelScript # Short-Description: Manages the services needed to run VMware software # Description: Manages the services needed to run VMware software ### END INIT INFO + load_modules() { # to be filled in via the stage1 configuration script + #TODO: everything behind || is not equal to Suse.pm modprobe -qa vmmon vmnet vmblock 2>/dev/null || echo "Problem here!" # most probably nobody wants to run the parallel port driver ... #modprobe vm... @@ -72,7 +74,9 @@ sub fillRunlevelScript # distinction is made via enabled forwarding setup_vmnet1() { if [ -n "\$vmnet1" ] ; then - test -c /dev/vmnet1 || mknod c 119 1 /dev/vmnet1 + # we don't need the following test. It's handled by + # XX_vmware.sh + #test -c /dev/vmnet1 || mknod c 119 1 /dev/vmnet1 # the path might be directly point to the plugin dir $location/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid \\ /dev/vmnet1 vmnet1 @@ -89,7 +93,9 @@ sub fillRunlevelScript # incomplete ... setup_vmnet8() { if [ -n "\$vmnet8" ] ; then - test -c /dev/vmnet1 || mknod c 119 8 /dev/vmnet8 + # we don't need the following test. It's handled by + # XX_vmware.sh + #test -c /dev/vmnet8 || mknod c 119 8 /dev/vmnet8 # /etc/vmware/vmnet-natd-8.mac simply contains a mac like 00:50:56:F1:30:50 $location/vmnet-natd -d /var/run/vmnet-natd-8.pid \\ -m /etc/vmware/vmnet-natd-8.mac -c /etc/vmware/nat.conf @@ -100,7 +106,6 @@ sub fillRunlevelScript runvmdhcpd() { if [ -n "\$dhcpif" ] ; then # the path might be directly point to the plugin dir - mkdir /var/run/vmware 2>/dev/null $location/vmnet-dhcpd -cf /etc/vmware/dhcpd.conf -lf \\ /var/run/vmware/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid \$dhcpif fi @@ -117,21 +122,33 @@ sub fillRunlevelScript setup_vmnet0 || log_warning_msg "Problems setting up vmnet0 interface" setup_vmnet1 || log_warning_msg "Problems setting up vmnet1 interface" setup_vmnet8 || log_warning_msg "Problems setting up vmnet8 interface" - runvmdhcpd + runvmdhcpd || log_warning_msg "Problems starting vmware dhcpd" log_end_msg $? ;; stop) # message output should match the given vendor-os log_daemon_msg "Stopping vmware background services ..." "vmware" killall vmnet-netifup vmnet-natd vmnet-bridge vmware vmplayer \\ - vmware-tray 2>/dev/null + vmware-tray vmnet-dhcpd 2>/dev/null # wait for shutting down of interfaces usleep 50000 unload_modules log_end_msg $? ;; - status) - log_daemon_msg "Say something useful here ..." + # we don't need a status yet... at least as long as it is + # unclear in which path the corresponding binary (see original + # /etc/init.d/vmware) is in our case + #status) + # log_daemon_msg "Say something useful here ..." + #;; + restart) + \$0 stop + \$0 start + exit $? + ;; + *) + log_success_msg "Usage: \$0 {start|stop|restart}" + exit 2 ;; esac exit 0 @@ -139,4 +156,4 @@ sub fillRunlevelScript return $script; } -1;
\ No newline at end of file +1; |