diff options
Diffstat (limited to 'sysconfig')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 9b108bb7..db1d9f8c 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -43,4 +43,8 @@ set_hostname() { echo "$1" > /etc/HOSTNAME hostname $1 + if ! grep search /etc/resolv.conf; then + domain=`echo $1 | sed 's/^[^\.]*\.//'` + echo "search $domain" >> /etc/resolv.conf + fi } |