Bug 274121

Summary: 'sleep -1' does not sleep
Product: [Fedora] Fedora Reporter: Felix Bellaby <felixbellaby>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-07 22:06:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Felix Bellaby 2007-09-01 22:12:25 UTC
mkinitrd produces init nash scripts ending with the 3 lines:

switchroot
echo Booting has failed.
sleep -1

This is probably intended to leave the console in an infinite sleep should the
switchroot fail. However, nash does not sleep in response to 'sleep -1' and the
following returns immediately:

# echo 'nash-sleep -1' | nash --force

I suspect that nash interprets the '-1' as an invalid option. Replacing the
'sleep -1' with 'sleep 120' does produce the desired effect.

Comment 1 Peter Jones 2007-09-07 22:06:15 UTC
This should be fixed in current mkinitrd.

Comment 2 Felix Bellaby 2007-09-24 21:40:21 UTC
This has not been fixed as of mkinitrd-6.0.17-1.fc8.

mkinitrd continues to add 'sleep -1' onto the end of scripts
nash still does not sleep.

The failure of this sleep call allows the kernel to panic
immediately after the "Booting has failed" message. This can
prevent the user from reading any helpful information left
on the console following an initrd failure.