[PATCH 06/10] dracut: import anaconda-lib.sh in pre-udev hook
Will Woods
wwoods at redhat.com
Fri Aug 17 22:30:43 UTC 2012
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(-)
diff --git a/dracut/anaconda-modprobe.sh b/dracut/anaconda-modprobe.sh
index 950c62f..6a6b20d 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 56ce928..8b95ce1 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:*)
--
1.7.11.2
More information about the anaconda-patches
mailing list