From 8d85429a4468df322b1507209cded7f70f7da4dd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 6 Mar 2013 16:00:11 +0100 Subject: [PATCH] dracut-functions.sh: add dracut_need_initqueue() dracut_module_included() for all rules files, which reference initqueue also call dracut_need_initqueue() --- dracut-functions.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dracut-functions.sh b/dracut-functions.sh index a2f366cd..59a8c633 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -110,6 +110,14 @@ fi export hookdirs } +dracut_need_initqueue() { + >"$initdir/lib/dracut/need-initqueue" +} + +dracut_module_included() { + strstr "$mods_to_load $modules_loaded" "$@" +} + # Create all subdirectories for given path without creating the last element. # $1 = path mksubdirs() { [[ -e ${1%/*} ]] || mkdir -m 0755 -p ${1%/*}; } @@ -932,6 +940,12 @@ inst_rule_group_owner() { fi } +inst_rule_initqueue() { + if grep -q -F initqueue "$1"; then + dracut_need_initqueue + fi +} + # udev rules always get installed in the same place, so # create a function to install them to make life simpler. inst_rules() { @@ -946,6 +960,7 @@ inst_rules() { _found="$r/$_rule" inst_rule_programs "$_found" inst_rule_group_owner "$_found" + inst_rule_initqueue "$_found" inst_simple "$_found" fi done @@ -955,6 +970,7 @@ inst_rules() { _found="${r}$_rule" inst_rule_programs "$_found" inst_rule_group_owner "$_found" + inst_rule_initqueue "$_found" inst_simple "$_found" "$_target/${_found##*/}" fi done