]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions: fixed inst() for mkinitrd compat
authorHarald Hoyer <harald@redhat.com>
Mon, 14 Sep 2009 13:53:55 +0000 (15:53 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 14 Sep 2009 13:53:55 +0000 (15:53 +0200)
dracut-functions

index acc9da90994e11d857b8e463de70474d326f4516..65cd4cb1fbd2c71fc3b010ee018247a05a7a8e1b 100755 (executable)
@@ -264,7 +264,11 @@ inst() {
         derror "inst only takes 1 or 2 or 3 arguments"
        exit 1
     fi
-    [[ "$2" = "$initdir" ]] && set $1 $3
+    if [[ $# = 3 ]]; then
+       [[ -z $initdir ]] && initdir=$2; 
+        export initdir
+        set $1 $3
+    fi
     for x in inst_symlink inst_script inst_binary inst_simple; do
        $x "$@" && return 0
     done