|
From: Justin M. F. <jmf...@li...> - 2007-11-07 03:44:15
|
On Tue, 2007-11-06 at 10:49 -0800, Elliot Lee wrote:
>
> I believe that the missing scripts were actually an oversight and should be
> included in the next open-vm-tools release. Sorry about that!
>
> Right now it looks like the scripts as they'll be shipped either execute
> another script directly, or just run a bunch of initscripts (/etc/init.d/*
> stuff). At this point, it sounds like you understand more about those
> scripts than I do. Are you mainly suggesting that each of the default
> scripts look in a scripts.d directory for other scripts to execute?
>
Right, so the scripts themselves are not necessary, in fact the ones
that ship with the closed vmware-tools only do:
echo `date` ": Executing '$0'"
They are run before the shutdown or restart when called from the
console. The console complains when they are not present as they are
reported not implemented, but the shutdown command should work fine.
>From an appliance standpoint, it would be nice to give appliance
developers the ability to add startup or shutdown scripts without
modifying the open-vm-tools package themselves. In this vein, we
shipped the following script
for /etc/vmware-tools/{poweroff,poweron,suspend,resume}-vm-default:
#!/bin/bash
execscript=$(basename $0)
scriptdir=/etc/vmware-tools/scripts/$execscript.d
for file in $scriptdir/*
do
[ -x $file ] && $file
done
# To match output from older VMware Tools
echo `date` ": Executing '$0'"
Realistically, the reboot or shutdown does a shutdown -r or -h so init
does it's job normally, and I don't think that the scripts will get much
use. Unfortunately the host complains and an error dialog appears if
they are not there, so we might as well give them the potential to be
useful.
Justin
|