summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-11-29 02:47:19 +0100
committerJames Rayner <james@archlinux.org>2009-12-03 21:38:23 +0100
commit5868417487dca1717b6c4a740709c83954af96ab (patch)
tree8a7448e194ce1d6f7358dc8584ded63e5af9350b
parent8a34d1dee00e9a262928c1a9eda639063762b4f7 (diff)
downloadnetctl-5868417487dca1717b6c4a740709c83954af96ab.tar.gz
netctl-5868417487dca1717b6c4a740709c83954af96ab.tar.xz
network: is_interface ignoring $1
Was the intent for is_interface to be passed the INTERFACE as a parameter (that's how it's called in most or all places)? Or to read INTERFACE from the current environment? That's how it's implemented. Also made INTERFACE in bring_interface a local variable. I don't think this should break anything, but I'm only 95% confident.
-rw-r--r--src/network3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network b/src/network
index bb6abf6..88c57dd 100644
--- a/src/network
+++ b/src/network
@@ -335,6 +335,7 @@ set_iface() {
is_interface() {
+ local INTERFACE="$1"
if [[ ! -e "/sys/class/net/$INTERFACE" ]]; then
if ! echo "$INTERFACE" | fgrep -q ":"; then
return 1
@@ -345,7 +346,7 @@ is_interface() {
bring_interface()
{
- INTERFACE="$2"
+ local INTERFACE="$2"
case "$1" in
up)
if ! ( eval $IFACE_UP ); then