Bug 60203 - exit code of mkinitrd is not reliable
exit code of mkinitrd is not reliable
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
David Lawrence
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2002-02-21 16:55 EST by Paul Clements
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-21 16:55:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Clements 2002-02-21 16:55:30 EST
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:

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...}

[ $? -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 17:22:10 EDT
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.