From: Böszörményi Zoltán Date: Thu, 24 Oct 2019 10:44:45 +0000 (+0200) Subject: Handle -r / --sysroot option in dracut.sh X-Git-Tag: 050~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b552d364a3bdacd02c1c9619635ab20a346b0568;p=thirdparty%2Fdracut.git Handle -r / --sysroot option in dracut.sh It was documented but not implemented. Signed-off-by: Böszörményi Zoltán --- diff --git a/dracut.sh b/dracut.sh index 5777f83a6..6658ba30c 100755 --- a/dracut.sh +++ b/dracut.sh @@ -313,7 +313,7 @@ rearrange_params() set -- "${newat[@]}" # Set new $@ TEMP=$(unset POSIXLY_CORRECT; getopt \ - -o "a:m:o:d:I:k:c:L:fvqlHhMN" \ + -o "a:m:o:d:I:k:c:r:L:fvqlHhMN" \ --long kver: \ --long add: \ --long force-add: \ @@ -339,6 +339,7 @@ rearrange_params() --long conf: \ --long confdir: \ --long tmpdir: \ + --long sysroot: \ --long stdlog: \ --long compress: \ --long prefix: \ @@ -512,6 +513,7 @@ while :; do -c|--conf) conffile="$2"; PARMS_TO_STORE+=" '$2'"; shift;; --confdir) confdir="$2"; PARMS_TO_STORE+=" '$2'"; shift;; --tmpdir) tmpdir_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -r|--sysroot) sysroot_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; -L|--stdlog) stdloglvl_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; --compress) compress_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; --prefix) prefix_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; @@ -618,6 +620,8 @@ while (($# > 0)); do shift done +[[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l" + if [[ $regenerate_all == "yes" ]]; then ret=0 if [[ $kernel ]]; then