Skip to content

Instantly share code, notes, and snippets.

@keeleysam
Created May 23, 2013 17:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save keeleysam/9de97f29698725675afd to your computer and use it in GitHub Desktop.
Save keeleysam/9de97f29698725675afd to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment