diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-13 15:03:29 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-13 15:03:29 +0200 |
commit | 2ac630138173e111e16b9c544d9da53f3af97f2e (patch) | |
tree | ec0d26f24d9aae50c76f46cbb20e647e207a2533 /dummy | |
parent | 5e5cd11724f6cf86edc5796e6b805573c767f757 (diff) |
proto-shell: add dns server support
Diffstat (limited to 'dummy')
-rwxr-xr-x | dummy/netifd-proto.sh | 7 | ||||
-rwxr-xr-x | dummy/proto/ppp.sh | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index c50d776..ae05b9c 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -53,6 +53,12 @@ proto_init_update() { [ -n "$3" ] && json_add_boolean "address-external" "$external" } +proto_add_dns_server() { + local address="$1" + + jshn_append PROTO_DNS "$address" +} + proto_add_ipv4_address() { local address="$1" local mask="$2" @@ -125,6 +131,7 @@ proto_send_update() { _proto_push_array "ip6addr" "$PROTO_IP6ADDR" _proto_push_ip _proto_push_array "route" "$PROTO_ROUTE" _proto_push_route _proto_push_array "route6" "$PROTO_ROUTE6" _proto_push_route + _proto_push_array "dns" "$PROTO_DNS" _proto_push_ip _proto_notify } diff --git a/dummy/proto/ppp.sh b/dummy/proto/ppp.sh index 13c4ebb..e7b9839 100755 --- a/dummy/proto/ppp.sh +++ b/dummy/proto/ppp.sh @@ -38,6 +38,7 @@ pppoe_setup() { echo "pppoe_setup($1, $2), username=$username, password=$password" proto_init_update ppp0 1 proto_add_ipv4_address "192.168.2.1" 32 + proto_add_dns_server "192.168.2.2" proto_send_update "$1" proto_run_command sleep 10 } |