#!/bin/sh # --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/ppp/ip-up # Copyright (C) 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- if [ "$DNS1" -o "$DNS2" ]; then sed -i -e '/.*# automatically added/d' /etc/resolv.conf ( echo "# automatically added by $0 during PPP connect ..." [ "$DNS1" ] && echo "nameserver $DNS1 # automatically added" [ "$DNS2" ] && echo "nameserver $DNS2 # automatically added" ) >> /etc/resolv.conf fi