run 331 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. exec 2>&1
  3. exec </dev/null
  4. pwd="$PWD"
  5. if="${PWD##*/dhcp_}"
  6. echo "* Upping iface $if"
  7. ip link set dev "$if" up
  8. echo "* Starting udhcpc"
  9. exec \
  10. env - PATH="$PATH" \
  11. softlimit \
  12. setuidgid root \
  13. udhcpc -vv \
  14. --hostname=null \
  15. --foreground \
  16. --interface="$if" \
  17. --pidfile="$pwd/udhcpc.pid" \
  18. --script="$pwd/dhcp_handler"