static_deprecated.sh 474 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. . /lib/functions.sh
  3. . ../netifd-proto.sh
  4. init_proto "$@"
  5. proto_static_deprecated_init_config() {
  6. renew_handler=1
  7. proto_config_add_string 'ip6addr:ip6addr'
  8. }
  9. proto_static_deprecated_setup() {
  10. local config="$1"
  11. local iface="$2"
  12. local ip6addr
  13. json_get_vars ip6addr
  14. proto_init_update "*" 1
  15. proto_add_ipv6_address "$ip6addr" "" "0"
  16. proto_send_update "$config"
  17. }
  18. proto_static_deprecated_teardown() {
  19. local config="$1"
  20. }
  21. add_protocol static_deprecated