Set a generic yet descriptive hostname
The default is to inherit the hostname from the build environment.
This commit is contained in:
parent
489dd2ab2d
commit
e4bd65c005
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -eu
|
||||||
|
# set-generic-hostname -- to a descriptive, reproducible string
|
||||||
|
# Copyright (C) 2017 Olaf Meeuwissen
|
||||||
|
#
|
||||||
|
# License: GPL-3.0+
|
||||||
|
|
||||||
|
. /etc/os-release
|
||||||
|
echo $ID-$(cat /etc/${ID}_version) > /etc/hostname
|
||||||
|
chmod 0644 /etc/hostname
|
||||||
|
|
||||||
|
rm $0
|
||||||
Loading…
Reference in New Issue