Where should custom vmware-tools scripts go

Posted by Cylindric on Server Fault See other posts from Server Fault or by Cylindric
Published on 2010-05-25T21:16:04Z Indexed on 2010/05/25 21:21 UTC
Read the original article Hit count: 260

Filed under:

I have installed the VMWare Tools into a test Ubuntu guest, and it's created the standard scripts as expected:

poweroff-vm-default
poweron-vm-default
resume-vm-default
suspend-vm-default

I add some custom actions to the scripts, but it says in the top of the file

##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################

So where should the custom scripts go, if I'm not supposed to modify these ones?

scriptsdir="`dirname $0`/scripts/`basename $0`.d"
if [ -d "$scriptsdir" ]; then
    for scriptfile in "$scriptsdir"/*; do
        [ -x "$scriptfile" ] && "$scriptfile" poweron-vm
    done
fi

© Server Fault or respective owner

Related posts about vmware