Create a gist now

Instantly share code, notes, and snippets.

#!/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