From 9aaf7c3a3310f73b099e64445737ffb5383fbc5d Mon Sep 17 00:00:00 2001 From: Marc Grimme Date: Thu, 23 Jul 2009 12:15:54 +0200 Subject: [PATCH] dracut_install: add "-o" option Calling dracut_install will optionally install the file. This is useful for the debug module. --- dracut-functions | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 } -- 2.47.3