summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lesiak <chris.lesiak@licor.com>2018-01-23 17:15:58 -0600
committerPeter Korsgaard <peter@korsgaard.com>2018-01-28 21:47:21 +0100
commitaebabb2780da4c5f85fec00b56f4690feb646073 (patch)
tree70a0455389dee32d992b1ed5e0294322d7abd718
parent5f2dc44590b824a72730f257a00a20216e40d552 (diff)
downloadbuildroot-aebabb2780da4c5f85fec00b56f4690feb646073.tar.gz
buildroot-aebabb2780da4c5f85fec00b56f4690feb646073.zip
package/systemd: Set fallback hostname
When BR2_TARGET_GENERIC_HOSTNAME is set, use the config option --with-fallback-hostname to specify the fallback hostname to use if none is configured in /etc/hostname. This is useful in a pristine installation with an empty /etc. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/systemd/systemd.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index ef31a0f6c6..b56c6c6b26 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -317,6 +317,11 @@ else
SYSTEMD_CONF_OPTS += -Dhibernate=false
endif
+SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
+ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
+SYSTEMD_CONF_OPTS += --with-fallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)
+endif
+
define SYSTEMD_INSTALL_INIT_HOOK
ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
OpenPOWER on IntegriCloud