From: Marc Grimme Date: Thu, 23 Jul 2009 10:15:54 +0000 (+0200) Subject: dracut_install: add "-o" option X-Git-Tag: 0.7~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9aaf7c3a3310f73b099e64445737ffb5383fbc5d;p=thirdparty%2Fdracut.git dracut_install: add "-o" option Calling dracut_install will optionally install the file. This is useful for the debug module. --- diff --git a/dracut-functions b/dracut-functions index 6fef83aca..97de9b4e5 100755 --- a/dracut-functions +++ b/dracut-functions @@ -200,12 +200,25 @@ inst_hook() { } dracut_install() { + local optional= while (($# > 0)); do + # Might be nice to optionally install a binary + if [ "$1" == "-o" ]; then + optional="yes" + shift + continue + fi if inst "$1" ; then shift continue fi - derror "Failed to install $1"; exit 1 + if [ "$optional" == "yes" ]; then + dwarning "Skipping program $1 as it cannot be found and is flagged to be optional" + shift + continue + else + derror "Failed to install $1"; exit 1 + fi done }