From b2d7a4a7d4e146100225087c1b2ba15780dc7046 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 27 Jul 2023 18:45:03 +0200 Subject: [PATCH] revert to systemd mdns --- usr/bin/archboot-network.sh | 4 ++-- usr/lib/archboot/login.sh | 3 ++- usr/lib/archboot/update/update.sh | 10 ++++++---- usr/lib/initcpio/install/archboot_net | 8 +------- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/usr/bin/archboot-network.sh b/usr/bin/archboot-network.sh index 9d81a5818..435f01b5e 100755 --- a/usr/bin/archboot-network.sh +++ b/usr/bin/archboot-network.sh @@ -195,9 +195,9 @@ _network() { fi echo "Using setup's network profile ${_NETWORK_PROFILE} now..." >"${_LOG}" systemctl restart systemd-networkd - systemctl restart avahi-daemon + systemctl restart systemd-resolved _dialog --infobox "Waiting for network link to come up..." 3 50 - # add sleep here to get correct values + # add sleep here for systemd-resolve get correct values _COUNT=0 while true; do sleep 1 diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index aa20980b7..ecfcba2ad 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -17,6 +17,7 @@ _local_mode () { if [[ -e /usr/bin/setup ]] ; then # bring down network systemctl stop systemd-networkd 2>/dev/null + systemctl stop systemd-resolved 2>/dev/null fi fi } @@ -166,7 +167,7 @@ if ! mount | grep -q zram0; then _switch_root_zram | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null else systemctl start systemd-networkd - systemctl start avahi-daemon + systemctl start systemd-resolved # initialize pacman keyring if [[ -e /etc/systemd/system/pacman-init.service ]]; then systemctl start pacman-init diff --git a/usr/lib/archboot/update/update.sh b/usr/lib/archboot/update/update.sh index 65b61776b..f5597aea0 100644 --- a/usr/lib/archboot/update/update.sh +++ b/usr/lib/archboot/update/update.sh @@ -422,7 +422,7 @@ _new_environment() { ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable iwd" &>"${_NO_LOG}" cp /etc/systemd/network/* "${_C_DIR}"/etc/systemd/network/ ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable systemd-networkd" &>"${_NO_LOG}" - ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable avahi-daemon" &>"${_NO_LOG}" + ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable systemd-resolved" &>"${_NO_LOG}" rm "${_C_DIR}"/etc/systemd/network/10-wired-auto-dhcp.network [[ -e '/etc/profile.d/proxy.sh' ]] && cp /etc/profile.d/proxy.sh "${_C_DIR}"/etc/profile.d/proxy.sh cp /.network "${_C_DIR}"/ @@ -805,16 +805,18 @@ EOF _custom_wayland_xorg() { if [[ -n "${_CUSTOM_WAYLAND}" ]]; then - echo -e "\e[1mStep 1/2:\e[m Installing custom wayland..." + echo -e "\e[1mStep 1/3:\e[m Installing custom wayland..." echo " This will need some time..." _prepare_graphic "${_WAYLAND_PACKAGE} ${_CUSTOM_WAYLAND}" > "${_LOG}" 2>&1 fi if [[ -n "${_CUSTOM_X}" ]]; then - echo -e "\e[1mStep 1/2:\e[m Installing custom xorg..." + echo -e "\e[1mStep 1/3:\e[m Installing custom xorg..." echo " This will need some time..." _prepare_graphic "${_XORG_PACKAGE} ${_CUSTOM_XORG}" > "${_LOG}" 2>&1 fi - echo -e "\e[1mStep 2/2:\e[m Setting up browser...\e[m" + echo -e "\e[1mStep 2/3:\e[m Starting avahi-daemon..." + systemctl start avahi-daemon.service + echo -e "\e[1mStep 3/3:\e[m Setting up browser...\e[m" which firefox &>"${_NO_LOG}" && _firefox_flags which chromium &>"${_NO_LOG}" && _chromium_flags } diff --git a/usr/lib/initcpio/install/archboot_net b/usr/lib/initcpio/install/archboot_net index 3e433d619..835ff3145 100644 --- a/usr/lib/initcpio/install/archboot_net +++ b/usr/lib/initcpio/install/archboot_net @@ -6,13 +6,7 @@ build () { map add_binary traceroute arping clockdiff tracepath ssh genl \ ifstat ctstat rtstat lnstat nstat rtacct rtmon ss tc bridge \ - dcb devlink rdma tipc vdpa ethtool elinks weechat brctl avahi-* - # add avahi and nss-mdns - add_full_dir /etc/avahi - for i in /usr/lib/libnss_mdns*; do - add_file "${i}" - done - sed -i -e 's#mymachines#mymachines mdns_minimal#g' ${BUILDROOT}/etc/nsswitch.conf + dcb devlink rdma tipc vdpa ethtool elinks weechat brctl # add iproute 2, add openssl helper libraries map add_full_dir "/usr/lib/tc" "/usr/share/tc" "/etc/iproute2" "/usr/lib/engines" # add dnssec-anchors