From 42a9093e263f7b226ee621ab930acfd00db5d6b4 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Fri, 17 Aug 2012 17:21:13 -0400 Subject: dracut: import anaconda-lib.sh in pre-udev hook Since each hook is (basically) a separate shell, we need to import anaconda-lib.sh at least once per hook. Since anaconda-modprobe.sh runs before the other scripts, this covers the whole hook. Still, it's a good idea to leave the imports in place so future maintainers know what functions come from where; clean up the existing import in repo-genrules.sh to actually provide this info. --- dracut/anaconda-modprobe.sh | 4 ++++ dracut/repo-genrules.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'dracut') diff --git a/dracut/anaconda-modprobe.sh b/dracut/anaconda-modprobe.sh index 950c62f29..6a6b20d13 100644 --- a/dracut/anaconda-modprobe.sh +++ b/dracut/anaconda-modprobe.sh @@ -1,5 +1,9 @@ #!/bin/bash # load modules needed by anaconda + +# load anaconda-lib for the subsequent scripts in this hook +. /lib/anaconda-lib.sh + ARCH=$(uname -m) KERNEL=$(uname -r) diff --git a/dracut/repo-genrules.sh b/dracut/repo-genrules.sh index 56ce9284f..8b95ce17b 100755 --- a/dracut/repo-genrules.sh +++ b/dracut/repo-genrules.sh @@ -2,8 +2,8 @@ # generate udev rules for handling anaconda-specific root devices # (just the disk-based ones - the network ones are done by netroot) -# see if we need anaconda-lib.sh -command -v unpack_updates_img >/dev/null || . /lib/anaconda-lib.sh +# import anaconda-lib for when_diskdev_appears +command -v when_diskdev_appears >/dev/null || . /lib/anaconda-lib.sh case "$root" in anaconda-disk:*) -- cgit