diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-10-19 10:05:23 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-10-19 10:05:23 +0200 |
commit | 4b264b72791a087d5a283b3bfad25adbaae22f68 (patch) | |
tree | 4176f4918aa72e55dd81fea742f76a492b2494c9 | |
parent | ebd48b2b0cc326a55e4ca167c5b6ad4e890c3c02 (diff) |
[Zshrc] some difficulties to get correct domain in some cases...
-rw-r--r-- | zshrc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -34,7 +34,9 @@ USER=${USER:-`whoami`} UID=${UID:-`id -u`} HOST=$HOST:r HOST=${HOST:-$(hostname -s)} -DOMAIN=${DOMAIN:-${$(hostname -d 2>&-):-$(hostname -y 2>&-)}} +DOMAIN=${DOMAIN:-$(hostname -a | cut -d. -f2-)} +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) DEBUG=${DEBUG:-no} |