]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Added -c switch to dracut to use a custom dracut.conf
authorVictor Lowther <victor.lowther@gmail.com>
Sat, 7 Mar 2009 03:16:41 +0000 (21:16 -0600)
committerVictor Lowther <victor.lowther@gmail.com>
Sat, 7 Mar 2009 03:16:41 +0000 (21:16 -0600)
Also some doc updates.

HACKING
TODO
dracut

diff --git a/HACKING b/HACKING
index e9efe09ac1fa818bf8e66c06ccbf663eaa37e35b..614aa506a4875a4a3e8165c216903ec40e7fc6e8 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -18,4 +18,3 @@ and set
 
 Requirements:
 * udev
-* nash (for switchroot until we get in util-linux)
diff --git a/TODO b/TODO
index 3ced6f7e569bb5633465364a99f1af9c12462d45..848ee2bf310334986a2a0e11f1b5b4ae9fac1f77 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,9 +4,6 @@ are/should be marked with "FIXME" in the code
 
 INITRAMFS TODO
 --------------
-* We have a horribly ugly switchroot implementation whose only
-  good point is that it gets rid of our dependency on nash.
-  It needs to be replaced by something nicer.
 * The hard-coded list of udev rules that we care about is kind of
 lame.  See about getting /lib/udev/initrules.d or similar for storing
 the rules that we care about in the initramfs.  These could be
diff --git a/dracut b/dracut
index 12d343141f09ea7ac44fdf581e37f5dee3153124..ff22a670e406b53cc3770cdc65d6b08a8bf77eb1 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -15,14 +15,17 @@ while (($# > 0)); do
        -h|--help) echo "Usage: $0 [-f] <initramfs> <kernel-version>"
            exit 1 ;;
        -v|--verbose) set -x;;
+       -c|--conf) conffile="$2"
        -l|--local) allowlocal="yes" ;;
        --allow-missing) : ;;
        *) break ;;
     esac
     shift
 done
-conffile="/etc/dracut.conf"
-[[ $allowlocal && -f dracut.conf ]] && conffile="dracut.conf"
+[[ -f $conffile ]] || {
+    conffile="/etc/dracut.conf"
+    [[ $allowlocal && -f dracut.conf ]] && conffile="dracut.conf"
+}
 . "$conffile"
 
 [[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut