login
Header Space

 
 

Re: [landisk] poweroff on "shutdown -r"/"reboot"

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Wednesday, April 25, 2007 - 8:49 pm

On Wed, 25 Apr 2007, Diana Eichert wrote:


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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[landisk] power-off button panic, Diana Eichert, (Tue Apr 24, 10:07 pm)
Re: [landisk] power-off button panic, Miod Vallat, (Wed Apr 25, 12:30 am)
Re: [landisk] power-off button panic, Diana Eichert, (Wed Apr 25, 8:39 am)
[landisk] poweroff on "shutdown -r"/"reboot", Diana Eichert, (Wed Apr 25, 3:16 pm)
Re: [landisk] poweroff on "shutdown -r"/"reboot", Diana Eichert, (Wed Apr 25, 8:49 pm)
Resolved Re: [landisk] poweroff on "shutdown -r"/"reboot", Diana Eichert, (Wed Apr 25, 9:39 pm)
Thanks Was: [landisk] power-off button panic, Diana Eichert, (Wed Apr 25, 3:02 pm)
Re: [landisk] power-off button panic, Matthew R. Dempsky, (Tue Apr 24, 11:54 pm)
speck-geostationary