From a2856fe1922df9ae066bdf6074fbbb06c5401459 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 19 Apr 2009 21:10:06 +0000 Subject: [PATCH] Use shell_var for shell variables. --- init.d/network.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/init.d/network.in b/init.d/network.in index 77f319da..823c81ff 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -164,7 +164,7 @@ runargs() start() { - local cr=0 r= int= cmd= args= upcmd= + local cr=0 r= int= intv= cmd= args= upcmd= einfo "Starting network" routeflush if [ "$RC_UNAME" = "Linux" ]; then @@ -181,9 +181,10 @@ start() eindent for int in $(interfaces); do local func= cf= - eval upcmd=\$ifup_$int + intv=$(shell_var "$int") + eval upcmd=\$ifup_$intv for func in ip ifconfig; do - eval cmd=\$${func}_${int} + eval cmd=\$${func}_${intv} if [ -n "$cmd" -o -f /etc/"$func.$int" ]; then cf=/etc/"$func.$int" break @@ -238,14 +239,15 @@ start() stop() { - local int= cmd= downcmd= + local int= intv= cmd= downcmd= einfo "Stopping network" routeflush eindent for int in $(reverse $(interfaces u)); do - eval downcmd=\$ifdown_$int - eval cmd=\$ip_$int - [ -z "$cmd" ] && eval cmd=\$ifconfig_$int + intv=$(shell_var "$int") + eval downcmd=\$ifdown_$intv + eval cmd=\$ip_$intv + [ -z "$cmd" ] && eval cmd=\$ifconfig_$intv if [ -n "$cmd" -o -f /etc/ip."$int" -o \ -f /etc/ifconfig."$int" -o \ -n "$downcmd" -o -f /etc/ifdown."$int" ];