diff options
-rw-r--r-- | rc.inet1 | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -155,8 +155,8 @@ if_up() { fi fi if [ -e /sys/class/net/${1%%:*} ]; then # interface exists - if ! /sbin/ip address show dev ${1} 2>/dev/null | grep -wq inet || \ - ! /sbin/ip link show dev ${1} | grep -wq "state UP" ; then # interface not up or not configured + if ! /sbin/ip address show permanent scope global dev ${1} 2>/dev/null | grep -Ewq '(inet|inet6)' || \ + ! /sbin/ip link show dev ${1} | grep -wq "state UP" ; then # interface not up or not configured if [ -n "${HWADDR[$i]}" ]; then # Set hardware address _before_ the interface goes up: echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev ${1} address ${HWADDR[$i]}" | $LOGGER /sbin/ip link set dev ${1} address ${HWADDR[$i]} |