aboutsummaryrefslogtreecommitdiff
path: root/init.d/network.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-19 21:10:06 +0000
committerRoy Marples <roy@marples.name>2009-04-19 21:10:06 +0000
commita2856fe1922df9ae066bdf6074fbbb06c5401459 (patch)
tree6b32e4f0ba1c465ec30c2e0e7a6ac33df74302a3 /init.d/network.in
parent8e5a601087d19c65ae569277991bcbb5b8fbb4c4 (diff)
Use shell_var for shell variables.
Diffstat (limited to 'init.d/network.in')
-rw-r--r--init.d/network.in16
1 files 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" ];