isNumber(): fixed '0' case
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 30 Mar 2004 20:25:44 +0000 (20:25 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 30 Mar 2004 20:25:44 +0000 (20:25 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1399 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/functions

index fcaf5a0..c664f2f 100644 (file)
@@ -110,7 +110,7 @@ function execute
 function isNumber
 {
     local tmp
-    let tmp=$1+0 2>/dev/null || return 1
+    let tmp=$1+0 2>/dev/null || test -z "${1//0/}" -a "$1" || return 1
     return 0
 }