From 76c9d0aaa9bb734ad1ef32c1cd6a56461210010a Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 11 Jun 2026 08:39:29 +0200 Subject: Better network management --- scripts/setup-config-alpine | 3 ++- scripts/status-linux | 9 +-------- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/setup-config-alpine b/scripts/setup-config-alpine index 8ea2347..a013dcb 100755 --- a/scripts/setup-config-alpine +++ b/scripts/setup-config-alpine @@ -62,7 +62,7 @@ doas mv "$tmp_xorg_file" /etc/X11/xorg.conf.d/40-libinput.conf tmp_doas_file=$(mktemp) cp /etc/doas.d/20-wheel.conf "$tmp_doas_file" -for c in poweroff reboot; do +for c in poweroff reboot ip udhcpc; do printf 'permit nopass :wheel as root cmd %s\n' "$c" >> "$tmp_doas_file" done doas cp "$tmp_doas_file" /etc/doas.d/20-wheel.conf @@ -116,6 +116,7 @@ NameResolvingService=resolvconf EOF doas mv "$tmp_iwd_file" /etc/iwd/main.conf +doas cp /dev/null /etc/network/interfaces doas rc-update add iwd boot doas rc-update del networking boot diff --git a/scripts/status-linux b/scripts/status-linux index a88649c..5fa4e13 100755 --- a/scripts/status-linux +++ b/scripts/status-linux @@ -27,17 +27,10 @@ else battery="No battery" fi -# NetworkManager has a dreadful command line interface -# It makes cry every time -# pls help -#nwline="$(nmcli device status | head -n 2 | tail -n 1)" -#nwclean="$(echo "$nwline" | sed 's/ *$//' | sed 's/.* //')" -#network="Network: $nwclean" - # Thank you iwctl for saving us from this dreadful existence network="$(iwctl station wlan0 show | grep 'Connected network' | \ awk '{$1=$2=""; $0=$0; print}' | sed 's/^ .//')" -if [ "$(cat /sys/class/net/eth0/carrier 2>/dev/null)" = 1 ]; then +if [ "$(cat /sys/class/net/eth1/carrier 2>/dev/null)" = 1 ]; then if [ -z "$network" ]; then network="eth" else -- cgit v1.3