#!/bin/sh rm -f /var/etc/nameservers.$2.conf # unset CGI environment variables so as not to confuse PHP unset CONTENT_TYPE GATEWAY_INTERFACE REMOTE_USER REMOTE_ADDR AUTH_TYPE unset HTTP_USER_AGENT CONTENT_LENGTH SCRIPT_FILENAME HTTP_HOST unset SERVER_SOFTWARE HTTP_REFERER SERVER_PROTOCOL REQUEST_METHOD unset SERVER_PORT SCRIPT_NAME SERVER_NAME # write nameservers to file dns1pfx=${6% *} dns2pfx=${7% *} dns1=${6#dns1 } dns2=${7#dns2 } if [ "$dns1pfx" = "dns1" -a -n "$dns1" ]; then echo $dns1 >> /var/etc/nameservers.$2.conf fi if [ "$dns2pfx" = "dns2" -a -n "$dns2" ]; then echo $dns2 >> /var/etc/nameservers.$2.conf fi # let the configuration system know that the # WAN IP address has changed /etc/rc.newwanip &