Skip to content

Instantly share code, notes, and snippets.

@chikosan
Last active November 17, 2016 17:35
Show Gist options
  • Save chikosan/b991c68a9da00b3a7b6bd6cce71aff07 to your computer and use it in GitHub Desktop.
Save chikosan/b991c68a9da00b3a7b6bd6cce71aff07 to your computer and use it in GitHub Desktop.
#!/bin/bash
# shopt -s nullglob
shopt -s nocasematch
veros=$( grep 'release' /etc/*release | grep release | cut -d " " -f4 | uniq )
#read -p "please enter your ip:" ipinput
#ssh -o StrictHostKeyChecking=no $ipnput -l root "main"
vminstall() {
echo ps >> /tmp/ps.tmp
# wget http://10.1.8.47/VmwareTools10.0.9.tar.gz -P /tmp/vm-tools
# tar -zxvf /tmp/vmware-tools/VmwareTools10.0.9.tar.gz -C /tmp/vm-tools
# cd /tmp/vm-tools/vmware-tools-distrib/
# ./vmware-install.pl -d
# rm -Rf /tmp/vm-tools
}
main() {
if [ "$veros" -ge "7" ]; then
if service vmware-tools status | grep run 1>/dev/null; then
# vmware-uninstall-tools.pl &&
# vminstall
echo "os version more then 7" >> /etc/ver.os
else
# vminsatll
echo "ELSE version more then 7" >> /tmp/ver.os
fi
else
echo "it not a linux machhine"
exit 1
fi
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment