From Gary, 5 Years ago, written in Plain Text.
Embed
  1. #!/bin/bash
  2.  
  3. ######################################################################
  4. #Name:          VMTools-Kernup
  5. #Author:        gballantine@bournemouth.ac.uk
  6. #Date:          17 Dec 2013
  7. #Version:       1
  8. #Description:   A script to reinstall VMWare Tools when a kernel
  9. #               has been upgraded                              
  10. ######################################################################
  11. #Changelog:     Please provide a date, change details and initials
  12. ######################################################################
  13.  
  14.  
  15. kern=$(uname -r)
  16.  
  17. if [ ! -f /root/kern ]
  18. then
  19.         echo $kern > /root/kern
  20. else
  21.         ckern=$(cat /root/kern)
  22. fi
  23.  
  24. if [ ! $kern == $ckern ]
  25. then
  26.         echo $kern > /root/kern
  27.         if [ -f /root/vmware-tools-distrib/vmware-install.pl ]
  28.         then
  29.                 /root/vmware-tools-distrib/vmware-install.pl --default
  30.         fi
  31. fi