From 9a106739a0f217f9231ee434398d73c5a7c6a37a Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Sun, 19 May 2024 16:03:45 +0200 Subject: [PATCH] persist_hostname: fix missing hostname command Without busybox `persist_hostname` will fail: ``` /init: 491: /init: hostname: not found ``` Write directly to the kernel to set the hostname instead. --- scripts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/functions b/scripts/functions index 0034d47..60f9195 100644 --- a/scripts/functions +++ b/scripts/functions @@ -488,7 +488,7 @@ persist_hostname() local domain="${2-}" echo "$hostname" > /etc/hostname - hostname -F /etc/hostname + echo "$hostname" > /proc/sys/kernel/hostname _generate_hosts_content "$hostname" "$domain" > /etc/hosts }