[Nut-upsuser] Is newhidups driver still in memory just before o/s halt ?

Marc Rechté marc2 at rechte.fr
Thu Mar 22 21:20:02 CET 2007

Hello Charles,

Thanks for your feedback.

This is Red Hat EL 4.

You seem to be right about the mounted filesystem. This is the last 
lines of halt script:

# Try all file systems other than root and RAM disks, one last time.
mount |  awk '!/( \/ |^\/dev\/root|^\/dev\/ram| \/proc )/ { print $3 }' | \
   while read line; do
     umount -f $line

# Remount read only anything that's left mounted.
# echo $"Remounting remaining filesystems readonly"
mount | awk '{ print $3 }' | while read line; do
     mount -n -o ro,remount $line

# Now halt or reboot.
echo $"$message"
if [ -f /fastboot ]; then
  echo $"On the next boot fsck will be skipped."
elif [ -f /forcefsck ]; then
  echo $"On the next boot fsck will be forced."

if [ "$command" = /sbin/halt -a -r /etc/ups/upsmon.conf -a -f 
/etc/killpower -a -f /etc/sysconfig/ups ] ; then
	. /etc/sysconfig/ups
	if [ "$SERVER" = "yes" -a "$MODEL" = "upsdrvctl" ] ; then
		/sbin/upsdrvctl shutdown
	elif [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n 
"$DEVICE" ] ; then

if [ -x /sbin/halt.local ]; then

HALTARGS="-i -d"
[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"

exec $command $HALTARGS

Of course I will not touch this script, but there is a possibility to 
write one's own /sbin/halt.local script. Is not it too late to use the 
usb driver ?


> The stack is still available, but the USB filesystem (/proc/bus/usb or
> /dev/bus/usb) might have been unmounted. It is generally safe to
> remount it, since it does not map to persistent storage.
> Which RedHat version/distro are you working with?

More information about the Nut-upsuser mailing list