Bug 60203 - exit code of mkinitrd is not reliable
Summary: exit code of mkinitrd is not reliable
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-21 21:55 UTC by Paul Clements
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-02-21 21:55:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Paul Clements 2002-02-21 21:55:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.7-2.24mlsmp i686)

Description of problem:
mkinitrd 3.2.6-1:

It would be very helpful if the exit code of mkinitrd could be relied upon to
determine whether an error occurred during the making of an initrd image. There
are several cases where mkinitrd fails to create a usable initrd but still exits
with a 0 value. If mkinitrd is used in a script, this can cause unwanted
failures and kernel panics.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
For example, given a shell script that performs an automated kernel upgrade:

mkinitrd /boot/initrd 2.4.9-21
[ $? -ne 0 ] && echo "ERROR" && exit 1

{...append entry to lilo.conf...}

lilo
[ $? -ne 0 ] && echo "ERROR" && exit 1


Now, fill /boot almost full. When the "gzip -9" command at the bottom of the
mkinitrd script fails, an incomplete initrd image is produced. However, the exit
value of mkinitrd is 0. If the system is rebooted after lilo is run, the kernel
will panic.

Actual Results:  exit value of 0 when errors occurred during mkinitrd

Expected Results:  exit value of 1 if errors occur

Additional info:

Comment 1 Erik Troan 2002-05-21 21:22:10 UTC
should be better in 3.3.11 -- probably more work needs to be done though


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