"z9_local_conf": Make sure that $HOSTNAME is set
authorAlexander Barton <alex@barton.de>
Mon, 25 May 2015 00:14:16 +0000 (02:14 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 25 May 2015 00:14:16 +0000 (02:14 +0200)
plugins/z9_local_conf/z9_local_conf.plugin.zsh

index 036a42e8aeeb21408d921fda165c8d94cb710616..be365dd58f6326b3093d1109d066bc3db54bbe2e 100644 (file)
@@ -1,6 +1,9 @@
 # z9_local_conf.plugin.zsh
 # 2015-05-24, alex@barton.de
 
+[ -n "$HOSTNAME" ] || HOSTNAME=$( hostname )
+export HOSTNAME
+
 zshrc_local="/var/lib/$HOSTNAME/zshrc"
 [ -r "$zshrc_local" ] && source "$zshrc_local"
 unset zshrc_local