From: <bl...@us...> - 2004-03-03 21:18:13
|
Update of /cvsroot/devil-linux/build/config/etc/profile.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18527/config/etc/profile.d Added Files: save-config-warning.example Log Message: I like this method better. /etc/profile never needs to be changed, which is better for upgrades. --- NEW FILE: save-config-warning.example --- # Rename this file to "save-config-warning.sh" (must end in ".sh") # to activate the warning to run save-config before shutting down. # # You may modify the number of seconds to wait before timing out by changing # the "60" (after the "-t") to another value on the "read" line. # # You may also modify the default answer from timeout, and just pressing ENTER, # from "n" to "y" by changing "${ANS:-n}" to "${ANS:-y}" on the "if" statement. shutdown () { echo echo "*** Reminder: Do not forget to run save-config! ***" echo read -p "Continue with shutdown? (y/n) " -t 60 -n 1 -rs ANS echo if [ "${ANS:-n}" = "y" ]; then echo "Running shutdown now:" /sbin/shutdown "$@" else echo "Shutdown canceled." unset ANS fi } |