From: Harald Hoyer Date: Mon, 31 Aug 2009 09:39:21 +0000 (+0200) Subject: add hostonly to dracut.conf X-Git-Tag: 001~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba72631039df2962514d85e9059ef022c18916ba;p=thirdparty%2Fdracut.git add hostonly to dracut.conf --- diff --git a/dracut b/dracut index 7e5f2d41e..1d74316d0 100755 --- a/dracut +++ b/dracut @@ -80,7 +80,7 @@ while (($# > 0)); do -v|--verbose) beverbose="yes";; -c|--conf) conffile="$2"; shift;; -l|--local) allowlocal="yes" ;; - -H|--hostonly) hostonly="-h" ;; + -H|--hostonly) hostonly_l="yes" ;; -i|--include) include_src="$2"; include_target="$3"; shift 2;; -I|--install) install_items="$2"; shift;; -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; @@ -110,12 +110,15 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l [[ $fw_dir_l ]] && fw_dir=$fw_dir_l [[ $do_strip_l ]] && do_strip=$do_strip_l +[[ $hostonly_l ]] && hostonly=$hostonly_l [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut [[ $fw_dir ]] || fw_dir=/lib/firmware [[ $do_strip ]] || do_strip=yes # eliminate IFS hackery when messing with fw_dir fw_dir=${fw_dir//:/ } +[[ $hostonly = yes ]] && hostonly="-h" + [[ $allowlocal && -f "$(dirname $0)/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=$dracutbasedir if [[ -f $dsrc/dracut-functions ]]; then diff --git a/dracut.conf b/dracut.conf index 8e8e90f5a..f4e4daa82 100644 --- a/dracut.conf +++ b/dracut.conf @@ -8,3 +8,6 @@ # Additional kernel modules to install #drivers="" + +# build initrd only to boot current hardware +#hostonly="-h"