This matches the syntax used by `ip` itself, and by $ADDR6. --- src/connections/ethernet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connections/ethernet b/src/connections/ethernet index 487adf8..6a16b66 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -87,9 +87,9 @@ ethernet_up() { ;; static) if [[ -n "$ADDR" ]]; then - [[ -z $NETMASK ]] && NETMASK=24 - report_debug ethernet_up ip addr add "$ADDR/$NETMASK" brd + dev "$INTERFACE" - if ! ip addr add "$ADDR/$NETMASK" brd + dev "$INTERFACE"; then + [[ $ADDR == */* ]] || ADDR+="/${NETMASK:-24}" + report_debug ethernet_up ip addr add "$ADDR" brd + dev "$INTERFACE" + if ! ip addr add "$ADDR" brd + dev "$INTERFACE"; then report_iproute "Could not configure interface" fi fi -- 1.8.0.1