]> git.ipfire.org Git - people/stevee/network.git/commitdiff
cli: Check for correct arguments in cli_ident.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 Sep 2012 08:32:20 +0000 (08:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 Sep 2012 08:32:20 +0000 (08:32 +0000)
functions.cli

index b6ac6a160bef0150ba71240bcb539e3a7f738afa..46639ee92cb1cda980735d793d1060b47e260d53 100644 (file)
@@ -271,7 +271,7 @@ function cli_space() {
 
 function cli_ident() {
        local level=${1}
-       shift
+       assert isinteger level
 
        local ident=""
        while [ ${level} -gt 1 ]; do
@@ -279,7 +279,7 @@ function cli_ident() {
                level=$(( ${level} - 1 ))
        done
 
-       echo "${ident}"
+       print "${ident}"
 }
 
 function cli_yesno() {