summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-06-21 17:21:40 +0200
committerSimon Rettberg2023-06-21 17:21:40 +0200
commita165b6593fed4883ab202bb8cff60b97939b2eae (patch)
tree71624a164bc0906a23bfebe44cb100945c69df04
parent[slx-drm] Load nVidia driver for all Class 03 sub-types (diff)
downloadsystemd-init-a165b6593fed4883ab202bb8cff60b97939b2eae.tar.gz
systemd-init-a165b6593fed4883ab202bb8cff60b97939b2eae.tar.xz
systemd-init-a165b6593fed4883ab202bb8cff60b97939b2eae.zip
[slx-network] Write own hostname and fqdn to /etc/hosts
-rwxr-xr-xmodules.d/slx-network/scripts/udhcpc-trigger.stage31
1 files changed, 1 insertions, 0 deletions
diff --git a/modules.d/slx-network/scripts/udhcpc-trigger.stage3 b/modules.d/slx-network/scripts/udhcpc-trigger.stage3
index 6b5bbdfa..664600a6 100755
--- a/modules.d/slx-network/scripts/udhcpc-trigger.stage3
+++ b/modules.d/slx-network/scripts/udhcpc-trigger.stage3
@@ -168,6 +168,7 @@ if [ -n "$hostname" ]; then
echo "$hostname" > "/proc/sys/kernel/hostname"
echo "$hostname" > "/etc/hostname"
echo "127.0.0.1 localhost" > "/etc/hosts"
+ echo "$ip $fqdn $hostname" >> "/etc/hosts"
echo "SLX_HOSTNAME='$hostname'" >> "$NETWORK_CONF"
fi