Stop using the [ -z "$@" ] test, use [ $# = 0 ] instead, #176554.
This commit is contained in:
parent
0380d98d7d
commit
c3d899714c
@ -3,6 +3,8 @@
|
||||
|
||||
30 Apr 2007; Roy Marples <uberlord@gentoo.org>:
|
||||
|
||||
Stop using the [ -z "$@" ] test, use [ $# = 0 ] instead, #176554.
|
||||
|
||||
/etc/init.d/foo start and stop no longer exit when service is fully
|
||||
started or stopped, #176452.
|
||||
|
||||
|
@ -990,7 +990,7 @@
|
||||
# # 'from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100' \
|
||||
# #"
|
||||
# eval set -- $\rules_${IFVAR}
|
||||
# if [ -n "$@" ] ; then
|
||||
# if [ $# != 0 ] ; then
|
||||
# einfo "Adding IP policy routing rules"
|
||||
# eindent
|
||||
# # Ensure that the kernel supports policy routing
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user