secret
Created

  • Download Gist
rootprofile.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh
#############################################################################
# #
# Single user mode disabler #
# Version 1.0, 2013-05-21 #
# Samuel Keeley #
# #
# Adds a restart to the root profile with console 'vt100' to make the #
# machine reboot when booted to single user mode. #
# #
# #
#############################################################################
 
echo 'nvram boot-args=""' > /var/root/.profile
echo 'if [ $TERM = vt100 ]; then /sbin/reboot; fi' >> /var/root/.profile
 
exit 0

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.