diff options
author | Roy Marples <roy@marples.name> | 2007-04-30 13:19:26 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-30 13:19:26 +0000 |
commit | c3d899714c6e68ea13cb15a75829ba16ea6cf217 (patch) | |
tree | 64de6cc8289e177f4b6738034779162bc0bb6fae /net.Linux | |
parent | 0380d98d7dd8d0880764a2d0878df56d4e858b45 (diff) |
Stop using the [ -z "$@" ] test, use [ $# = 0 ] instead, #176554.
Diffstat (limited to 'net.Linux')
-rw-r--r-- | net.Linux/arping.sh | 2 | ||||
-rw-r--r-- | net.Linux/clip.sh | 4 | ||||
-rw-r--r-- | net.Linux/pppd.sh | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/net.Linux/arping.sh b/net.Linux/arping.sh index 763cb4ce..817f8b2d 100644 --- a/net.Linux/arping.sh +++ b/net.Linux/arping.sh @@ -44,7 +44,7 @@ arping_start() { einfo "Pinging gateways on ${IFACE} for configuration" eval $(_get_array "gateways_${IFVAR}") - if [ -z "$@" ] ; then + if [ $# = 0 ] ; then eerror "No gateways have been defined (gateways_${IFVAR}=\"...\")" return 1 fi diff --git a/net.Linux/clip.sh b/net.Linux/clip.sh index 5eab64c0..7d3fef9b 100644 --- a/net.Linux/clip.sh +++ b/net.Linux/clip.sh @@ -80,7 +80,7 @@ are_atmclip_svcs_running() { clip_pre_start() { eval $(_get_array "clip_${IFVAR}") - [ -z "$@" ] && return 0 + [ $# = 0 ] && return 0 if [ ! -r /proc/net/atm/arp ] ; then modprobe clip && sleep 2 @@ -110,7 +110,7 @@ clip_pre_start() { clip_post_start() { eval $(_get_array "clip_${IFVAR}") - [ -z "$@" ] && return 0 + [ $# = 0 ] && return 0 are_atmclip_svcs_running || return 1 diff --git a/net.Linux/pppd.sh b/net.Linux/pppd.sh index cf55951b..f1224dd8 100644 --- a/net.Linux/pppd.sh +++ b/net.Linux/pppd.sh @@ -114,7 +114,7 @@ pppd_pre_start() { [ -n "$1" ] && chatopts="${chatopts} -T '$1'" [ -n "$2" ] && chatopts="${chatopts} -U '$2'" eval $(_get_array "chat_${IFVAR}") - if [ -n "$@" ] ; then + if [ $# != 0 ] ; then opts="${opts} connect $(printf "'%s' " "${chatopts} $(printf "'%s' " "$@")")" fi |