login
Header Space

 
 

Resolved 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 - 9:39 pm

On Wed, 25 Apr 2007, Diana Eichert wrote:


my quick hack

# diff -u sbin/reboot/reboot.c.orig sbin/reboot/reboot.c
--- sbin/reboot/reboot.c.orig   Wed Apr 25 18:45:23 2007
+++ sbin/reboot/reboot.c        Wed Apr 25 18:47:50 2007
@@ -201,8 +201,10 @@
                 default:
                         /* rc exits 2 if powerdown=YES in rc.shutdown */
                         waitpid(pid, &status, 0);
-                       if (WIFEXITED(status) && WEXITSTATUS(status) == 2)
-                               howto |= RB_POWERDOWN;
+                       if (dohalt) {
+                               if (WIFEXITED(status) && WEXITSTATUS(status) == 2)
+                                       howto |= RB_POWERDOWN;
+                       }
                 }
         }

#

"shutdown -r now" and "reboot" now run rc.shutdown, sync disks and reboot 
as expected

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