Merge branch 'master' of git.higgsboson.tk:Mic92/evenet
Conflicts: tinc-up
This commit is contained in:
commit
26c20e5fb5
@ -1,5 +1,6 @@
|
|||||||
Subnet = 02:1F:C8:16:F2:C0
|
Subnet = 02:1F:C8:16:F2:C0
|
||||||
Address = tinc.higgsboson.tk
|
Address = tinc.higgsboson.tk
|
||||||
|
Port = 666
|
||||||
-----BEGIN RSA PUBLIC KEY-----
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
MIIBCgKCAQEAsGG/m+wr4Q5yRiJXojYu9bV1AgS7U7xUTe39RBAnuEEbpxgQ3SKP
|
MIIBCgKCAQEAsGG/m+wr4Q5yRiJXojYu9bV1AgS7U7xUTe39RBAnuEEbpxgQ3SKP
|
||||||
LLqf3ZBRkSeJ4xpevv66h7rR1/CIJ+xGbi2+m2QHLB66tGYUKQZIDa8TY9oss6lt
|
LLqf3ZBRkSeJ4xpevv66h7rR1/CIJ+xGbi2+m2QHLB66tGYUKQZIDa8TY9oss6lt
|
||||||
|
15
tinc-up
15
tinc-up
@ -64,12 +64,23 @@ set_ip() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_dhclient() {
|
||||||
|
local interface=$1
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||||
|
dhclient -nw "$interface"
|
||||||
|
elif [[ "$OSTYPE" == "freebsd"* ]]; then
|
||||||
|
dhclient -b "$interface"
|
||||||
|
else
|
||||||
|
nohup setsid dhclient "$interface" >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
start_dhcp() {
|
start_dhcp() {
|
||||||
local interface=$1
|
local interface=$1
|
||||||
if has dhcpcd; then
|
if has dhcpcd; then
|
||||||
dhcpcd "$interface"
|
dhcpcd -b -n "$interface"
|
||||||
elif has dhclient; then
|
elif has dhclient; then
|
||||||
dhclient "$interface"
|
start_dhclient "$interface"
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then # TODO untested
|
elif [[ "$OSTYPE" == "darwin"* ]]; then # TODO untested
|
||||||
ipconfig set "$interface" DHCP
|
ipconfig set "$interface" DHCP
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user