]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[PATCH 37/50] Try to install file as scripts before installing them as binaries
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 13 Feb 2009 12:42:59 +0000 (04:42 -0800)
committerDave Jones <davej@redhat.com>
Mon, 16 Feb 2009 18:56:42 +0000 (13:56 -0500)
This ensures that scripts will ahve their interpreter isntalled before
they get installed.

Also included a minor fixup that skips library checking if the binary
we are testing is already installed.

dracut-functions

index 1ded3d840f9b8903ef1e3359ec011336a29f13f9..97ac626010813a6e6d626158fd869252b7bfe228 100755 (executable)
@@ -59,6 +59,7 @@ inst_library() {
 inst_binary() {
     local bin="$1" target="${2:-$1}"
     local LDSO NAME IO FILE ADDR I1 n f TLIBDIR
+    [[ -f $initdir$target ]] && return 0
 
     LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null | \
        awk '/interpreter/ {print $4}' |sed -e 's/]$//')
@@ -122,7 +123,7 @@ inst() {
         return 1
     fi
     local src=$1 dest=${2:-$1}
-    for x in inst_symlink inst_binary inst_script inst_simple; do
+    for x in inst_symlink inst_script inst_binary inst_simple; do
        $x "$src" "$dest" && return 0
     done
     return 1