2009-11-06 04:04:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exec 2>&1
|
|
|
|
exec </dev/null
|
|
|
|
|
|
|
|
pwd="$PWD"
|
|
|
|
|
|
|
|
if="${PWD##*/dhcp_}"
|
|
|
|
|
|
|
|
echo "* Upping iface $if"
|
2019-04-21 14:30:19 +02:00
|
|
|
ip link set dev "$if" up || exec sleep 5
|
2009-11-06 04:04:19 +01:00
|
|
|
|
2019-04-05 18:38:12 +02:00
|
|
|
echo "* Starting udhcpc on $if [$$]"
|
2009-11-06 04:04:19 +01:00
|
|
|
exec \
|
|
|
|
env - PATH="$PATH" \
|
|
|
|
softlimit \
|
|
|
|
setuidgid root \
|
|
|
|
udhcpc -vv \
|
|
|
|
--hostname=null \
|
|
|
|
--foreground \
|
|
|
|
--interface="$if" \
|
|
|
|
--pidfile="$pwd/udhcpc.pid" \
|
|
|
|
--script="$pwd/dhcp_handler"
|