support manual-nameserver.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-connectivity / openresolv / openresolv-3.5.2 / 000resolvconf.ppp.ip-up
diff --git a/meta-openvuplus/recipes-connectivity/openresolv/openresolv-3.5.2/000resolvconf.ppp.ip-up b/meta-openvuplus/recipes-connectivity/openresolv/openresolv-3.5.2/000resolvconf.ppp.ip-up
new file mode 100644 (file)
index 0000000..e2963c0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# ppp.ip-up hook script for resolvconf
+# Written by Roy Marples <roy@marples.name> under the BSD-2 license
+
+[ -x /sbin/resolvconf ] || exit 0
+
+if [ -n "$DNS1" -o -n "$DNS2" ]; then
+       conf="# Generated by ppp.ip-up for $PPP_IFACE\n"
+       [ -n "$DNS1" ] && conf="${conf}nameserver $DNS1\n"
+       [ -n "$DNS2" ] && conf="${conf}nameserver $DNS2\n"
+       printf "$conf" | /sbin/resolvconf -a "$PPP_IFACE"
+fi