Bug 274121 - 'sleep -1' does not sleep
Summary: 'sleep -1' does not sleep
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: All
medium
low
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-01 22:12 UTC by Felix Bellaby
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-07 22:06:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.