diff options
author | James Rayner <james@archlinux.org> | 2010-02-21 12:53:23 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2010-02-21 12:53:23 +0100 |
commit | 3ef5489578b849d3632cbd858245e0f18b5fe8dd (patch) | |
tree | 496980fb0febe74977be622400ec17c2477dcb7f /src/connections | |
parent | 1b3a2e870c5619ad3a6c2ca5c7f30ccf37c8d422 (diff) | |
download | netctl-3ef5489578b849d3632cbd858245e0f18b5fe8dd.tar.gz netctl-3ef5489578b849d3632cbd858245e0f18b5fe8dd.tar.xz |
Add adjustable netmask to IP='static'
Diffstat (limited to 'src/connections')
-rw-r--r-- | src/connections/ethernet | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 8e51cf9..36f6b93 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -71,8 +71,9 @@ ethernet_up() { ;; static) if [[ -n "$ADDR" ]]; then - report_debug ethernet_iproute_up ip addr add "$ADDR/24" brd + dev "$INTERFACE" - if ! ip addr add "$ADDR/24" brd + dev "$INTERFACE"; then + [[ -z $NETMASK ]] && NETMASK=24 + report_debug ethernet_iproute_up ip addr add "$ADDR/$NETMASK" brd + dev "$INTERFACE" + if ! ip addr add "$ADDR/$NETMASK" brd + dev "$INTERFACE"; then report_iproute "Could not configure interface" fi fi |