diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2007-09-24 17:38:12 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 14:15:18 +0100 |
commit | 68f04afba2bfd7570aa9a34ef01b4bc87b0d1fb0 (patch) | |
tree | e4890de772e9345bc053c99e0200355cc9a8834b /.zshrc | |
parent | 6ffbe42ee3f679c4430782b394f7c4a0db33004c (diff) |
Get domain from /etc/resolv.conf if not found elsewhere.
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -32,6 +32,7 @@ USER=${USER:-`whoami`} UID=${UID:-`id -u`} HOST=${HOST:-$(hostname -s)} DOMAIN=${DOMAIN:-${$(hostname -d 2>&-):-$(hostname -y 2>&-)}} +[ $DOMAIN = "" -o $DOMAIN = "localdomain" -o $DOMAIN = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2) DEBUG=no |