improve hostname

This commit is contained in:
macmpi 2022-07-18 17:01:07 +02:00
parent 292f29ed8d
commit 46981535ce
2 changed files with 2 additions and 3 deletions

Binary file not shown.

View File

@ -34,7 +34,6 @@ if ! cp "${ovlpath}/interfaces" /etc/network/interfaces; then
cat <<-EOF >> /etc/network/interfaces cat <<-EOF >> /etc/network/interfaces
auto $dev auto $dev
iface $dev inet dhcp iface $dev inet dhcp
hostname localhost
EOF EOF
;; ;;
@ -42,7 +41,6 @@ if ! cp "${ovlpath}/interfaces" /etc/network/interfaces; then
[ -f /etc/wpa_supplicant/wpa_supplicant.conf ] && cat <<-EOF >> /etc/network/interfaces [ -f /etc/wpa_supplicant/wpa_supplicant.conf ] && cat <<-EOF >> /etc/network/interfaces
auto $dev auto $dev
iface $dev inet dhcp iface $dev inet dhcp
hostname localhost
EOF EOF
;; ;;
@ -52,7 +50,6 @@ if ! cp "${ovlpath}/interfaces" /etc/network/interfaces; then
iface $dev inet static iface $dev inet static
address 10.42.0.2/24 address 10.42.0.2/24
gateway 10.42.0.1 gateway 10.42.0.1
hostname localhost
EOF EOF
@ -69,6 +66,8 @@ fi
echo "Using following network interfaces:" echo "Using following network interfaces:"
cat /etc/network/interfaces cat /etc/network/interfaces
echo "alpine-headless" > /etc/hostname
hostname -F /etc/hostname
rc-service networking start rc-service networking start