reset_coredump_warning.sh 614 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. export VI_SERVER="cl-vcenter.ciscolive.network"
  3. if [ -z "${VI_USERNAME}" -o -z "${VI_PASSWORD}" ]; then
  4. echo "You must set the VI_USERNAME and VI_PASSWORD environment variables first."
  5. exit 1
  6. fi
  7. hosts=$(/home/jclarke/getHosts.pl)
  8. for h in ${hosts}; do
  9. vicfg-advcfg -h ${h} --set 0 UserVars.SuppressCoredumpWarning >/dev/null
  10. if [ $? != 0 ]; then
  11. echo "Failed to unset suppression warning for ${h}!"
  12. continue
  13. fi
  14. vicfg-advcfg -h ${h} --set 1 UserVars.SuppressCoredumpWarning > /dev/null
  15. if [ $? != 0 ]; then
  16. echo "Failed to set suppression warning for ${h}!"
  17. fi
  18. done