From 866f81aaa5e438537e6a4b30c1f0fcecc713a1a2 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 20 Feb 2018 21:20:18 -0600 Subject: system/openrc: migrate from aports fork --- system/openrc/hostname.initd | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 system/openrc/hostname.initd (limited to 'system/openrc/hostname.initd') diff --git a/system/openrc/hostname.initd b/system/openrc/hostname.initd new file mode 100644 index 000000000..c1580db08 --- /dev/null +++ b/system/openrc/hostname.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +description="Sets the hostname of the machine." + +depend() { + keyword -prefix -lxc +} + +start() { + if [ -s /etc/hostname ] ; then + opts="-F /etc/hostname" + else + opts="localhost" + fi + ebegin "Setting hostname" + hostname $opts + eend $? +} -- cgit v1.2.3-60-g2f50