[master&rhel6-branch] Only kill init for reboot/halt and then exit linuxrc.s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Like init.c, linuxrc.s390 should exit immediately after having
sent the corresponding signal to the init process when called
as reboot or halt (or poweroff in the future).
While it might often not be noticed, if linuxrc continues after
sending the signal since the system shuts down anyway,
there are practical cases where the signalling does not work
and linuxrc would otherwise startup yet another instance of the
installer. Even though, linuxrc detects that it does not run
with PID==1, we should not bet on its "test" mode
for the cases where it serves as replacement for reboot/halt.

Related: rhbz#571370
---
 loader/linuxrc.s390 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 99e5192..614f7ff 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -43,8 +43,10 @@
 
 if [ "${0##*/}" = "reboot" ]; then
     kill -USR2 1
+    exit
 elif [ "${0##*/}" = "halt" ]; then
     kill -USR1 1
+    exit
 fi
 
 VERSION=1.2
-- 
1.7.0.4


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux