Bug#404894: update-initramfs: zero exit status when initramfs is altered or does not exist
On Fri, 29 Dec 2006, Tomas Tintera wrote:
> Package: initramfs-tools
> Version: 0.85e
>
> I think that update-initramfs should return some non-zero error status
> when trying to update a non-existing or altered initramfs.
no.
that would not allow to configure udev, cryptsetup or whatever
package that has update-initramfs -u in it's postinst in the case
of a modified initramfs. that modification needs to be respected.
it's most likely done by the admin himself.
> Currently, when I am trying to configure e.g. an uswsusp package
> (dpkg-reconfigure uswsusp), and have initramfs removed, the
> configuration script calls update-initramfs, which does not update
> anything (because of non-existing initramfs) - it only shows the error
> message
>
> /boot/initrd.img-2.6.17-2-686 does not exist. Cannot update.
>
> (that is good) and exits with error status 0. The result is that uswsusp
> is not properly configured, but dpkg-reconfigure exits with status 0 -
> which should not happen, I think (I would expect dpkg-reconfigure to
> exit with non-zero error status).
>
> I suggest to use panic() instead of mild_panic() in altered_check() in
> the update-initramfs script.
unless you come up with a _really_ compelling arg, that wasn't presented
yet and that supersedes aboves analysis, i'll close that bug soon.
best regards
--
maks
Reply to: