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
|
||||
|
||||
DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||
|
@ -24,9 +24,11 @@ set_mac() {
|
|||
else
|
||||
ifconfig "$interface" ether "$mac_address"
|
||||
fi
|
||||
ifconfig "$interface" up
|
||||
elif has ip; then
|
||||
ip link set dev "$interface" down
|
||||
ip link set dev "$interface" address "$mac_address"
|
||||
ip link set dev "$interface" up
|
||||
else
|
||||
die "no suitable program found to configure the network interface, need iproute2 or ifconfig"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue