Denys Vlasenko | 095ddf7 | 2016-10-03 23:43:44 +0200 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | exec 2>&1 | ||||
4 | exec </dev/null | ||||
5 | |||||
6 | pwd="$PWD" | ||||
7 | |||||
8 | if="${PWD##*/dhcpd_}" | ||||
9 | |||||
10 | echo "* Upping iface $if" | ||||
11 | ip link set dev $if up | ||||
12 | |||||
13 | >>udhcpd.leases | ||||
14 | sed 's/^interface.*$/interface '"$if/" -i udhcpc.conf | ||||
15 | |||||
16 | echo "* Starting udhcpd" | ||||
17 | exec \ | ||||
18 | env - PATH="$PATH" \ | ||||
19 | softlimit \ | ||||
20 | setuidgid root \ | ||||
21 | udhcpd -f -vv udhcpc.conf | ||||
22 | |||||
23 | exit $? |