Exit non-zero on error / how to detect failure?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently built a initramfs with dracut in debian (051-1), but
it seems this is still a problem on mainline.
I have a config in /etc/dracut/dracut.conf.d that said:

    install_items+="/etc/usermode-helper.conf usermode-helper"

An error elsewhere meant that those items were missing from the filesystem.

dracut exited 0 with emitted messages like:

    dracut-install: ERROR: installing '/etc/usermode-helper.conf'
    dracut-install: ERROR: installing 'usermode-helper'
    dracut: FAILED: /usr/lib/dracut/dracut-install -D <dir> \
        -a -l /etc/usermode-helper.conf usermode-helper

In my usage, this is a FATAL error, and failure to catch it here meant lost
time down the road.  I "solved" it by capturing output and grepping
for "ERROR:" or "FAILED:", but that is less than desirable.

Is there a way to tell dracut to exit non-zero on errors like this?

Scott



[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux