summaryrefslogtreecommitdiffstats
path: root/src/connections
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2010-02-21 12:53:23 +0100
committerJames Rayner <james@archlinux.org>2010-02-21 12:53:23 +0100
commit3ef5489578b849d3632cbd858245e0f18b5fe8dd (patch)
tree496980fb0febe74977be622400ec17c2477dcb7f /src/connections
parent1b3a2e870c5619ad3a6c2ca5c7f30ccf37c8d422 (diff)
downloadnetctl-3ef5489578b849d3632cbd858245e0f18b5fe8dd.tar.gz
netctl-3ef5489578b849d3632cbd858245e0f18b5fe8dd.tar.xz
Add adjustable netmask to IP='static'
Diffstat (limited to 'src/connections')
-rw-r--r--src/connections/ethernet5
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