]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions:inst_script() call inst_binary() with found bin
authorHarald Hoyer <harald@redhat.com>
Fri, 21 Oct 2011 10:33:05 +0000 (12:33 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 21 Oct 2011 10:33:05 +0000 (12:33 +0200)
call inst_binary() with the already found executable to prevent
searching for the binary again

dracut-functions

index a56e4603c3c98a76ba0b3b834babe5a13dc086d5..a5d6d1fa08d2174f5581359a6cbc56f8a7043c1d 100755 (executable)
@@ -443,13 +443,14 @@ inst_binary() {
 inst_script() {
     local _bin
     _bin=$(find_binary "$1") || return 1
+    shift
     local _line _shebang_regex
     read -r -n 80 _line <"$_bin"
     # If debug is set, clean unprintable chars to prevent messing up the term
     [[ $debug ]] && _line=$(echo -n "$_line" | tr -c -d '[:print:][:space:]')
     _shebang_regex='(#! *)(/[^ ]+).*'
     [[ $_line =~ $_shebang_regex ]] || return 1
-    inst "${BASH_REMATCH[2]}" && inst_binary "$@"
+    inst "${BASH_REMATCH[2]}" && inst_binary "$_bin" "$@"
 }
 
 # same as above, but specialized for symlinks