shutdown but no power off
nathan r. hruby
yellowdog-general@lists.terrasoftsolutions.com
Thu Sep 19 14:39:01 2002
On Thursday, September 19, 2002, at 04:10 PM, Michael George wrote:
> What's the cleanest solution to this? I guess changing to single user
> runlevel and unmounting the filesystems and waiting for death might
> work, but I'm not even sure we could umount / with the system running...
the following shell code should remount all ext[2|3] mounted filesystems
as readonly
for i in `cat /etc/mtab | grep ext | cut -d" " -f2`; do
mount -o remount ro $i
done
Even if the machine crashes due to power loss, the filesystems should be
clean. A better solution might be to use ext3 or just get a bigger
UPS :) You may want to look at the pf and pr keys in /etc/inittab as
well, which control what happens when init receives a powerfail and
powerreturn event, should you decided to do the "kill every process and
wait till the ups kills me' appraoch. Also be sure that everything is
truly going to be halted when dropping to runlevel 1 (/sbin/chkconfig
--list will show you what supposed to be running at each level keytable
is fine to run.. it jsut sets the keyboard mappings and exits)
FWIW, Dell BIOSes give you the option to stay off, turn on, or go back
doing whatever it was doing when the power failed when the power is
restored, which I think is quite nice
-n
--
......
nathan hruby - nhruby@arches.uga.edu
computer services specialist
uga drama
http://www.drama.uga.edu/
......