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 acc9da9..65cd4cb 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