Created
October 15, 2014 05:41
-
-
Save trodemaster/4b202edd9327eba1ad6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
# VMware tools install with expect | |
# Decompress tools payload | |
spawn /bin/tar zxf /tmp/VMwareTools.tar.gz -C /tmp | |
wait | |
# timeout needed to wait for longer tasks in the install process | |
set timeout 300 | |
# start the installer script | |
spawn perl /tmp/vmware-tools-distrib/vmware-install.pl | |
# Answer the questions presented by the installer | |
# Legacy installer | |
expect "*no]*" | |
send "yes\n" | |
# In which directory do you want to install the binary files | |
expect "*bin]*" | |
send "\n" | |
# What is the directory that contains the init directories | |
expect "*rc.d]*" | |
send "\n" | |
# What is the directory that contains the init scripts | |
expect "*init.d]*" | |
send "\n" | |
# In which directory do you want to install the daemon files | |
expect "*sbin]*" | |
send "\n" | |
# In which directory do you want to install the library files | |
expect "*tools]*" | |
send "\n" | |
# /usr/lib/vmware-tools" does not exist currently | |
expect "*yes]*" | |
send "\n" | |
# In which directory do you want to install the documentation files | |
expect "*tools]*" | |
send "\n" | |
# The path "/usr/share/doc/vmware-tools" does not exist | |
expect "*yes]*" | |
send "\n" | |
# invoking the following command: "/usr/bin/vmware-config-tools.pl" | |
expect "*yes]*" | |
send "\n" | |
# VMware Host-Guest Filesystem | |
expect "*yes]*" | |
send "no\n" | |
# vmblock enables dragging or copying files | |
expect "*yes]*" | |
send "no\n" | |
# enable VMware automatic kernel modules | |
expect "*no]*" | |
send "yes\n" | |
# Do you want to enable Guest Authentication (vgauth) | |
expect "*yes]*" | |
send "yes\n" | |
# wait for the end | |
expect "*the VMware team" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment