inst never takes 3 arguments anymore.
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 19:44:48 +0000 (13:44 -0600)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 19:44:48 +0000 (13:44 -0600)
Remove the misleading help message and the 3 argument processing.

dracut-functions

index 504332b..ac37bb2 100755 (executable)
@@ -153,17 +153,11 @@ inst_rules() {
 # general purpose installation function
 # Same args as above.
 inst() {
-    if (($# != 1 && $# != 2 && $# != 3)); then
-        echo "usage: inst <file> <root> [<destination file>]"
-        return 1
-    fi
-    local dst
-    [ $# = 3 ] && dst=$3
-    if [ $# = 2 ]; then 
-        [ -d "$2" ] || dst=$2
+    if (($# != 1 && $# != 2 )); then
+        echo "usage: inst <file> [<destination file>]"
     fi
     for x in inst_symlink inst_script inst_binary inst_simple; do
-       $x $1 $dst && return 0
+       $x "$@" && return 0
     done
     return 1
 }