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.

13 lines
484 B

  1. #!/bin/sh
  2. #
  3. # Prepend resolver options to /etc/resolv.conf after dhclient`
  4. # regenerates the file. See man (5) resolver for more details.
  5. #
  6. if [ $reason = "BOUND" ]; then
  7. if [ -n "$new_domain_search" -o -n "$new_domain_name_servers" ]; then
  8. RESOLV_CONF=$(cat /etc/resolv.conf | sed -r '/^options (timeout|attempts|ndots).*$/d')
  9. OPTIONS="options timeout:2\noptions attempts:2\noptions ndots:{{ ndots }}"
  10. printf "%b\n" "$RESOLV_CONF\n$OPTIONS" > /etc/resolv.conf
  11. fi
  12. fi