Commit 3dcca39a authored by Paul Wolneykien's avatar Paul Wolneykien Committed by Anton Midyukov

net: Allow to configure hostname via TARGET_HOSTNAME

parent ff66f763
Эта фича конфигурирует базовую поддержку сети, включая нужную подсистему
(etcnet, NetworkManager поверх etcnet или connman).
Используйте TARGET_HOSTNAME для определения имени узла (файлы
/etc/sysconfig/network и /etc/hostname).
......@@ -7,6 +7,7 @@ use/net: use/services use/pkgpriorities
@$(call add,THE_PACKAGES,iputils)
@$(call add,PINNED_PACKAGES,$$(THE_NET_SUBSYS))
@$(call set,THE_NET_SUBSYS,network-config-subsystem)
@$(call xport,TARGET_HOSTNAME)
use/net/etcnet: use/net
@$(call set,THE_NET_SUBSYS,etcnet)
......
#!/bin/sh -efu
#
# Sets up the node's hostname.
. shell-config
if [ -n "${GLOBAL_TARGET_HOSTNAME:-}" ]; then
shell_config_set /etc/sysconfig/network 'TARGET_HOSTNAME' "$GLOBAL_TARGET_HOSTNAME"
echo "$GLOBAL_TARGET_HOSTNAME" >/etc/hostname
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment