#!/command/execlineb -P multisubstitute { import -ui interface import -ui ip import -ui subnet import -ui mask import -ui router import -ui dns import -uD localdomain domain import -ui lease } foreground { redirfd -w 1 /run/service/udhcpc-${interface}/env/IPARG s6-echo -- "-r "${ip}" " } unexport ? if { s6-echo "udhcpc-script: bound: ${ip}/${mask} on ${interface}, gateway ${router}, lease time ${lease}" } if { ip addr add ${ip}/${subnet} dev ${interface} } foreground { redirfd -w 2 /dev/null ip route del default } if { route add default gw ${router} } fdmove 1 3 s6-echo