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.

22 lines
376 B

  1. dns_init() {
  2. if isfirst "dns"; then
  3. addcode up 4 1 "echo -n "" > /etc/resolv.conf"
  4. fi
  5. }
  6. public_nameserver() {
  7. addcode up 4 5 "echo nameserver $1 >> /etc/resolv.conf"
  8. dns_init
  9. }
  10. public_search() {
  11. if ! isfirst "dns_search"; then
  12. error "Keyword >>search<< not allowed multiple times."
  13. return
  14. fi
  15. addcode up 4 4 "echo search $* >> /etc/resolv.conf"
  16. dns_init
  17. }