Skip to contentSkip to conversation

package/systemd: Set fallback hostname

PATCH New Chris Lesiak 2 participants 2 messages Jan 23, 2018 – Jan 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 package/systemd/systemd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/systemd/systemd.mk +5 -0
index ef31a0f6c6..b56c6c6b26 100644
@@ -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
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 package/systemd: Set fallback hostname

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Chris" == Chris Lesiak <[email protected]> writes:

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard