diff options
author | Hugues Hiegel <hugues.hiegel@openwide.fr> | 2009-10-19 11:24:54 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@openwide.fr> | 2009-10-19 11:24:54 +0200 |
commit | 13b40aef113ec97dab079082a7fdfea3c1087552 (patch) | |
tree | 03c5c0024be1d4de627088ab44ea40b2eb5a12d5 | |
parent | 6959f63851876645ef358f2777e7cdff2e8eec93 (diff) |
[Zshrc] DOMAIN guessing correction
-rw-r--r-- | zshrc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -34,7 +34,7 @@ USER=${USER:-`whoami`} UID=${UID:-`id -u`} HOST=$HOST:r HOST=${HOST:-$(hostname -s)} -DOMAIN=${DOMAIN:-$(hostname -a | cut -d. -f2-)} +DOMAIN=${DOMAIN:-$(hostname -a | sed 's/^[^\.]*\.\?//')} DOMAIN=${DOMAIN:-$(hostname -d 2>&-)} DOMAIN=${DOMAIN:-$(hostname -y 2>&-)} [ "$DOMAIN" = "" -o "$DOMAIN" = "localdomain" -o "$DOMAIN" = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2) |