mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
264 B

  1. #!/bin/bash
  2. if [ "$DNS1" -o "$DNS2" ] ; then
  3. sed -i '/^nameserver .*/d' /etc/resolv.conf
  4. (
  5. echo "# added by /etc/ppp/ip-up during PPP connect ..."
  6. [ "$DNS1" ] && echo "nameserver $DNS1"
  7. [ "$DNS2" ] && echo "nameserver $DNS2"
  8. ) >> /etc/resolv.conf
  9. fi