]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Shell portability fixes
authorRoy Marples <roy@marples.name>
Wed, 1 Jun 2011 06:28:41 +0000 (06:28 +0000)
committerRoy Marples <roy@marples.name>
Wed, 1 Jun 2011 06:28:41 +0000 (06:28 +0000)
configure
dhcpcd-hooks/20-resolv.conf
dhcpcd-run-hooks.in

index 6b464a17af5161431640befe1189e6d126fa8b8b..8a395fef0efefe535cf38eaf065f623ad98134ab 100755 (executable)
--- a/configure
+++ b/configure
@@ -15,7 +15,7 @@ DEBUG=
 FORK=
 INCLUDEDIR=
 
-for x; do
+for x do
        opt=${x%%=*}
        var=${x#*=}
        case "$opt" in
index 984dae6907ad040a405e13720edfc6e1825fe260..85f388cd3e94641be4816ae6a3482ba5d87e4252 100644 (file)
@@ -31,7 +31,7 @@ build_resolv_conf()
                set -- ${domain}
                unset domain
                if [ -n "$2" ]; then
-                       search="$search $@"
+                       search="$search $*"
                elif [ -n "$1" ]; then
                        domain="domain $1\n"
                fi
@@ -88,7 +88,7 @@ add_resolv_conf()
                fi
                # Support RFC violating search in domain
                if [ -z "$new_domain_search" -a -n "$2" ]; then
-                       new_domain_search="$@"
+                       new_domain_search="$*"
                fi
        fi
        if [ -n "$new_domain_search" ]; then
index 11d29fb7b48c45101d3bc7ad97ebaf6c1730a4be..0e603381d91426e58de24e23b85f0a8e1a7ee9a7 100644 (file)
@@ -20,7 +20,7 @@ esac
 uniqify()
 {
        local result= i=
-       for i; do
+       for i do
                case " $result " in
                        *" $i "*);;
                        *) result="$result $i";;
@@ -62,7 +62,7 @@ key_get_value()
        if type sed >/dev/null 2>&1; then
                sed -n "s/^$key//p" $@
        else
-               for x; do
+               for x do
                        while read line; do
                                case "$line" in
                                "$key"*) echo "${line##$key}";;
@@ -82,7 +82,7 @@ remove_markers()
        if type sed >/dev/null 2>&1; then
                sed "/^$m1/,/^$m2/d" $@
        else
-               for x; do
+               for x do
                        while read line; do
                                case "$line" in
                                "$m1"*) in_marker=1;;
@@ -172,7 +172,7 @@ valid_domainname_list()
 {
        local name
 
-       for name in $@; do
+       for name do
                valid_domainname "$name" || return $?
        done
        return 0