mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Seewer Philippe <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
To: "<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>"
	<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] priorize -m over dracut.conf, add --modules and get rid of automatic use of ./dracut.conf
Date: Sat, 7 Mar 2009 11:53:40 +0100	[thread overview]
Message-ID: <49B25234.4020904@bfh.ch> (raw)

Victor Lowther introduced -c to freely set dracut.conf. Means we can get
rid of automatic use of ./dracut.conf if -l is used, use -c instead.

Second this patch prefers options before config files and adds an option
-d|--drivers to set the modules= option.

Patch is built on top of Harald Hoyers merge tree
(git://git.surfsite.org/pub/git/dracut.git)


---
diff --git a/dracut b/dracut
index d8da6d6..dad6687 100755
--- a/dracut
+++ b/dracut
@@ -11,7 +11,8 @@
 while (($# > 0)); do
     case $1 in
 	-f|--force) force=yes;;
-	-m|--modules) dracutmodules="$2"; shift;;
+	-m|--modules) dracutmodules_l="$2"; shift;;
+	-d|--drivers) modules_l="$2"; shift;;
 	-h|--help) echo "Usage: $0 [-f] <initramfs> <kernel-version>"
 	    exit 1 ;;
 	-v|--verbose) set -x;;
@@ -22,11 +23,12 @@ while (($# > 0)); do
     esac
     shift
 done
-[[ -f $conffile ]] || {
-    conffile="/etc/dracut.conf"
-    [[ $allowlocal && -f dracut.conf ]] && conffile="dracut.conf"
-}
-. "$conffile"
+
+[[ -f $conffile ]] || [[ -f /etc/dracut.conf ]] && conffile="/etc/dracut.conf"
+[[ -f $conffile ]] && . "$conffile"
+
+[[ $dracutmodules_l ]] && dracutmodules=$dracutmodule_l
+[[ $modules_l ]] && modules=$modules_l
 
 [[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut
 . $dsrc/dracut-functions
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2009-03-07 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B25234.4020904@bfh.ch \
    --to=philippe.seewer-omb+w0dpw2o@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox