1#!/bin/sh 2# 3# 4 5# PROVIDE: noshutdown 6# REQUIRE: var 7# BEFORE: LOGIN 8 9. /etc/rc.subr 10 11name="noshutdown" 12desc="Disable shutdown(8) for precious machines" 13rcvar="precious_machine" 14start_cmd="noshutdown_start" 15stop_cmd="noshutdown_stop" 16 17: ${noshutdown_file:="/var/run/noshutdown"} 18 19noshutdown_start() 20{ 21 touch $noshutdown_file 22} 23 24noshutdown_stop() 25{ 26 rm -f $noshutdown_file 27} 28 29load_rc_config $name 30 31run_rc_command "$1" 32