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.
This commit is contained in:
Benjamin Drung 2024-05-19 16:03:45 +02:00
parent 9dc8ac0c78
commit 9a106739a0

View File

@ -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
}