tinc-up: set interfaces up afterwards
This commit is contained in:
parent
b870478b72
commit
adc63b9765
4
tinc-up
4
tinc-up
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||||
|
@ -24,9 +24,11 @@ set_mac() {
|
||||||
else
|
else
|
||||||
ifconfig "$interface" ether "$mac_address"
|
ifconfig "$interface" ether "$mac_address"
|
||||||
fi
|
fi
|
||||||
|
ifconfig "$interface" up
|
||||||
elif has ip; then
|
elif has ip; then
|
||||||
ip link set dev "$interface" down
|
ip link set dev "$interface" down
|
||||||
ip link set dev "$interface" address "$mac_address"
|
ip link set dev "$interface" address "$mac_address"
|
||||||
|
ip link set dev "$interface" up
|
||||||
else
|
else
|
||||||
die "no suitable program found to configure the network interface, need iproute2 or ifconfig"
|
die "no suitable program found to configure the network interface, need iproute2 or ifconfig"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user