# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Sam Sep 30 11:42:30 CEST 2006 [mika]
################################################################################
-num=$(wc -l $0)
-num=${num%% $0}
-num=$(( $num - 16 ))
-randline=$(($(date +%Y%M%S) * $$ % $num))
-hostname=$(tail -n $randline "$0" | head -1 | grep -v "'" | grep -v '^#' | grep -v '^$')
+hostname_start=$(grep -n "^# EOF" "$0")
+hostname_start=${hostname_start%%:#*}
+hostname_start=$(( hostname_start + 3 ))
+hostname=$(tail -n +$hostname_start "$0" | grep -v "'" | grep -v '^#' | grep -v '^$' | sort -R | tail -1)
[ -n "$hostname" ] && echo "$hostname" || echo "grml"
-# EOF - line 15; now the hostnames:
+# EOF - now the hostnames:
+# shellcheck disable=SC2034
hostnames='
23
42
hoth
hoyvin-mayvin
hypohemia
+idspispopd
ilum
introubulate
jabba
kidnappophilie
kilbeggan
killbot-factory
+kitchensink
knifey-spooney
knowitallism
knowledgeum
spaghettimonster
spambox
speedholes-or-speed-holes
+spispopd
spokesrebel
ssh
stabby