Merge remote-tracking branch 'origin/github/pr/100'
authorMichael Prokop <mika@grml.org>
Thu, 28 May 2020 09:32:23 +0000 (11:32 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 28 May 2020 09:32:23 +0000 (11:32 +0200)
etc/zsh/zshenv
etc/zsh/zshrc

index 9b70921..8e4ae78 100644 (file)
@@ -32,6 +32,8 @@ elif [[ -x $(which hostname) ]] ; then
   export HOSTNAME="$(hostname)"
 elif [[ -x $(which hostnamectl) ]] ; then
   export HOSTNAME="$(hostnamectl --static)"
+else
+  export HOSTNAME="$(uname -n)"
 fi
 
 # make sure /usr/bin/id is available
index 43cda0c..6360f5f 100644 (file)
@@ -843,6 +843,8 @@ function grmlcomp () {
       localname=$(hostname)
     elif check_com hostnamectl ; then
       localname=$(hostnamectl --static)
+    else
+      localname="$(uname -n)"
     fi
 
     hosts=(
@@ -2522,6 +2524,8 @@ function grml_maintain_name () {
       localname=$(hostname)
     elif check_com hostnamectl ; then
       localname=$(hostnamectl --static)
+    else
+      localname="$(uname -n)"
     fi
 
     # set hostname if not running on local machine