add avahi daemon to environment

This commit is contained in:
Tobias Powalowski 2023-07-27 17:19:45 +02:00
parent c851cfbf79
commit 6178975aca
4 changed files with 14 additions and 11 deletions

View file

@ -195,9 +195,9 @@ _network() {
fi fi
echo "Using setup's network profile ${_NETWORK_PROFILE} now..." >"${_LOG}" echo "Using setup's network profile ${_NETWORK_PROFILE} now..." >"${_LOG}"
systemctl restart systemd-networkd systemctl restart systemd-networkd
systemctl restart systemd-resolved systemctl restart avahi-daemon
_dialog --infobox "Waiting for network link to come up..." 3 50 _dialog --infobox "Waiting for network link to come up..." 3 50
# add sleep here for systemd-resolve get correct values # add sleep here to get correct values
_COUNT=0 _COUNT=0
while true; do while true; do
sleep 1 sleep 1

View file

@ -17,7 +17,6 @@ _local_mode () {
if [[ -e /usr/bin/setup ]] ; then if [[ -e /usr/bin/setup ]] ; then
# bring down network # bring down network
systemctl stop systemd-networkd 2>/dev/null systemctl stop systemd-networkd 2>/dev/null
systemctl stop systemd-resolved 2>/dev/null
fi fi
fi fi
} }
@ -167,7 +166,7 @@ if ! mount | grep -q zram0; then
_switch_root_zram | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null _switch_root_zram | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
else else
systemctl start systemd-networkd systemctl start systemd-networkd
systemctl start systemd-resolved systemctl start avahi-daemon
# initialize pacman keyring # initialize pacman keyring
if [[ -e /etc/systemd/system/pacman-init.service ]]; then if [[ -e /etc/systemd/system/pacman-init.service ]]; then
systemctl start pacman-init systemctl start pacman-init

View file

@ -422,7 +422,7 @@ _new_environment() {
${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable iwd" &>"${_NO_LOG}" ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable iwd" &>"${_NO_LOG}"
cp /etc/systemd/network/* "${_C_DIR}"/etc/systemd/network/ 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 systemd-networkd" &>"${_NO_LOG}"
${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable systemd-resolved" &>"${_NO_LOG}" ${_NSPAWN} "${_C_DIR}" /bin/bash -c "systemctl enable avahi-daemon" &>"${_NO_LOG}"
rm "${_C_DIR}"/etc/systemd/network/10-wired-auto-dhcp.network 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 [[ -e '/etc/profile.d/proxy.sh' ]] && cp /etc/profile.d/proxy.sh "${_C_DIR}"/etc/profile.d/proxy.sh
cp /.network "${_C_DIR}"/ cp /.network "${_C_DIR}"/
@ -805,18 +805,16 @@ EOF
_custom_wayland_xorg() { _custom_wayland_xorg() {
if [[ -n "${_CUSTOM_WAYLAND}" ]]; then if [[ -n "${_CUSTOM_WAYLAND}" ]]; then
echo -e "\e[1mStep 1/3:\e[m Installing custom wayland..." echo -e "\e[1mStep 1/2:\e[m Installing custom wayland..."
echo " This will need some time..." echo " This will need some time..."
_prepare_graphic "${_WAYLAND_PACKAGE} ${_CUSTOM_WAYLAND}" > "${_LOG}" 2>&1 _prepare_graphic "${_WAYLAND_PACKAGE} ${_CUSTOM_WAYLAND}" > "${_LOG}" 2>&1
fi fi
if [[ -n "${_CUSTOM_X}" ]]; then if [[ -n "${_CUSTOM_X}" ]]; then
echo -e "\e[1mStep 1/3:\e[m Installing custom xorg..." echo -e "\e[1mStep 1/2:\e[m Installing custom xorg..."
echo " This will need some time..." echo " This will need some time..."
_prepare_graphic "${_XORG_PACKAGE} ${_CUSTOM_XORG}" > "${_LOG}" 2>&1 _prepare_graphic "${_XORG_PACKAGE} ${_CUSTOM_XORG}" > "${_LOG}" 2>&1
fi fi
echo -e "\e[1mStep 2/3:\e[m Starting avahi-daemon..." echo -e "\e[1mStep 2/2:\e[m Setting up browser...\e[m"
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 firefox &>"${_NO_LOG}" && _firefox_flags
which chromium &>"${_NO_LOG}" && _chromium_flags which chromium &>"${_NO_LOG}" && _chromium_flags
} }

View file

@ -6,7 +6,13 @@ build ()
{ {
map add_binary traceroute arping clockdiff tracepath ssh genl \ map add_binary traceroute arping clockdiff tracepath ssh genl \
ifstat ctstat rtstat lnstat nstat rtacct rtmon ss tc bridge \ ifstat ctstat rtstat lnstat nstat rtacct rtmon ss tc bridge \
dcb devlink rdma tipc vdpa ethtool elinks weechat brctl 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
# add iproute 2, add openssl helper libraries # add iproute 2, add openssl helper libraries
map add_full_dir "/usr/lib/tc" "/usr/share/tc" "/etc/iproute2" "/usr/lib/engines" map add_full_dir "/usr/lib/tc" "/usr/share/tc" "/etc/iproute2" "/usr/lib/engines"
# add dnssec-anchors # add dnssec-anchors