1 2 3 4 5 6
check_root() { if [ `whoami` != root ]; then echo "Run this script as root, exiting!"; exit; fi }