summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
diff options
context:
space:
mode:
authorMichael Larson <mike@ft1.vyatta.com>2009-09-09 16:26:01 -0700
committerMichael Larson <mike@ft1.vyatta.com>2009-09-09 16:26:01 -0700
commit5f1a33134d463fa565ee9dd43237252bd27d5fb3 (patch)
tree70f1ac5b1e76a0ae875c71ca15089ecdbc45c122 /scripts/vyatta-interfaces.pl
parent028e8e12c5e15efc0a316641f2b02e46d5c77210 (diff)
parent42abfac6f11077dbfc3b0eaf845597e38f7cd685 (diff)
downloadvyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.tar.gz
vyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.zip
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg into kenwood
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-xscripts/vyatta-interfaces.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 86410c1..567e3b7 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -260,10 +260,12 @@ sub update_eth_addrs {
}
if ($version == 4) {
- return system("ip addr add $addr broadcast + dev $intf");
+ exec (qw(ip addr add),$addr,qw(broadcast + dev), $intf)
+ or die "ip addr command failed: $!";
}
if ($version == 6) {
- return system("ip -6 addr add $addr dev $intf");
+ exec (qw(ip -6 addr add), $addr, 'dev', $intf)
+ or die "ip addr command failed: $!";
}
die "Error: Invalid address/prefix [$addr] for interface $intf\n";
}
@@ -316,7 +318,8 @@ sub update_mac {
system "sudo ip link set $intf up"
and die "Could not set $intf up ($!)\n";
} else {
- exec "sudo ip link set $intf address $mac";
+ system "sudo ip link set $intf address $mac"
+ and die "Could not set $intf address ($!)\n";
}
exit 0;
}