On Wed, 25 Apr 2007, Diana Eichert wrote:
Now I have another question. In order to get power down to work, you have to
set "powerdown=YES" to power down the unit. Now that's pretty obvious, but
why when you run "shutdown -r"/"reboot" does the system power down? Doesn't
that obviate the reboot command? I would think "powerdown=YES" would be
ignored on "shutdown -r"/"reboot".
diana
on further perusal through reboot.c I see where the "-p" switch only works
if program is called as halt.
case 'p':
/* Only works if we're called as halt. */
if (dohalt) {
pflag = 1;
howto |= RB_POWERDOWN;
}
break;
Shouldn't the check for "powerdown=YES in rc.shutdown" also be wrapped
by something similar?
execl(_PATH_BSHELL, "sh", _PATH_RC, "shutdown", (char
*)NULL);
_exit(1);
default:
/* rc exits 2 if powerdown=YES in rc.shutdown */
waitpid(pid, &status, 0);
if (WIFEXITED(status) && WEXITSTATUS(status) == 2)
howto |= RB_POWERDOWN;
I'm downloading -current source to one of my landisks so I can make the
change to reboot.c .
diana