summaryrefslogtreecommitdiffstats
path: root/elchos/root-image/krebs/bin/set-hostname.sh
diff options
context:
space:
mode:
Diffstat (limited to 'elchos/root-image/krebs/bin/set-hostname.sh')
-rwxr-xr-xelchos/root-image/krebs/bin/set-hostname.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/elchos/root-image/krebs/bin/set-hostname.sh b/elchos/root-image/krebs/bin/set-hostname.sh
new file mode 100755
index 00000000..31101a18
--- /dev/null
+++ b/elchos/root-image/krebs/bin/set-hostname.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+hostn="elch_$(/krebs/bin/macid.sh)"
+hostnamectl set-hostname "$hostn"
+hostname $hostn
+echo "$hostn" > /etc/hostname