diff options
-rw-r--r-- | init.d/net.lo.in | 4 | ||||
-rw-r--r-- | net/iproute2.sh | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in index 06304e1..0bb69f3 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -225,9 +225,9 @@ _configure_variables() for var in ${_config_vars}; do local v= for t; do - eval v=\$${var}_${t} + eval v="\"\$${var}_${t}\"" if [ -n "${v}" ]; then - eval ${var}_${IFVAR}=\$${var}_${t} + eval "${var}_${IFVAR}=\"\$${var}_${t}\"" continue 2 fi done diff --git a/net/iproute2.sh b/net/iproute2.sh index 46f0e48..bd7333e 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -91,10 +91,9 @@ _set_flag() _get_mac_address() { local mac= - read -r mac < /sys/class/net/"${IFACE}"/address || return 1 - local mac=$(LC_ALL=C _ip link show "${IFACE}" | sed -n \ + mac=$(LC_ALL=C _ip link show "${IFACE}" | sed -n \ -e 'y/abcdef/ABCDEF/' \ - -e '/link\// s/^.*\<\(..:..:..:..:..:..\)\>.*/\1/p') + -e '/link\// s/^.*\<\(..:..:..:..:..:..\)\>.*/\1/p' | head -n1) case "${mac}" in 00:00:00:00:00:00) return 1 ;; |