dracut-functions: make inst() mkinitrd compatible
authorHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 16:01:14 +0000 (18:01 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 16:05:00 +0000 (18:05 +0200)
dracut-functions

index 6009ace..acc9da9 100755 (executable)
@@ -260,10 +260,11 @@ inst_rules() {
 # general purpose installation function
 # Same args as above.
 inst() {
-    if (($# != 1 && $# != 2 )); then
-        derror "inst only takes 1 or 2 arguments"
+    if (($# != 1 && $# != 2 && $# != 3 )); then
+        derror "inst only takes 1 or 2 or 3 arguments"
        exit 1
     fi
+    [[ "$2" = "$initdir" ]] && set $1 $3
     for x in inst_symlink inst_script inst_binary inst_simple; do
        $x "$@" && return 0
     done