ifplugd_handler 359 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # parameters:
  3. # $1: interface
  4. # $2: state
  5. if test x"$2" = x"down"; then
  6. echo "Downing dhcp_$1"
  7. svc -d "dhcp_$1"
  8. echo "Downing zcip_$1"
  9. svc -d "zcip_$1"
  10. fi
  11. if test x"$2" = x"up"; then
  12. echo "Upping dhcp_$1"
  13. svc -u "dhcp_$1"
  14. echo "Upping zcip_$1"
  15. svc -u "zcip_$1"
  16. fi
  17. # Parent ifplugd exits if we exit with nonzero.
  18. # Do not startle it:
  19. exit 0