You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
542 B

  1. #!/bin/sh
  2. PPP_IPPARAM="$6"
  3. . /lib/netifd/netifd-proto.sh
  4. proto_init_update "$IFNAME" 1 1
  5. proto_set_keep 1
  6. [ -n "$PPP_IPPARAM" ] && {
  7. [ -n "$IPLOCAL" ] && proto_add_ipv4_address "$IPLOCAL" 32 "" "$IPREMOTE"
  8. [ -n "$IPREMOTE" ] && proto_add_ipv4_route 0.0.0.0 0 "" "$IPLOCAL"
  9. [ -n "$DNS1" ] && proto_add_dns_server "$DNS1"
  10. [ -n "$DNS2" -a "$DNS1" != "$DNS2" ] && proto_add_dns_server "$DNS2"
  11. }
  12. proto_send_update "$PPP_IPPARAM"
  13. [ -d /etc/ppp/ip-up.d ] && {
  14. for SCRIPT in /etc/ppp/ip-up.d/*
  15. do
  16. [ -x "$SCRIPT" ] && "$SCRIPT" "$@"
  17. done
  18. }