summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-06-11 08:39:29 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-06-11 08:39:29 +0200
commit76c9d0aaa9bb734ad1ef32c1cd6a56461210010a (patch)
treea25eeefdfaccd980ee82fb43c52f3b6737bc4ff6 /scripts
parent39fb7962ef35aa152d412322fd210be6ae462382 (diff)
downloadconfig-76c9d0aaa9bb734ad1ef32c1cd6a56461210010a.tar.gz
config-76c9d0aaa9bb734ad1ef32c1cd6a56461210010a.zip
Better network management
Diffstat (limited to '')
-rwxr-xr-xscripts/setup-config-alpine3
-rwxr-xr-xscripts/status-linux9
2 files changed, 3 insertions, 9 deletions
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
62 62
63tmp_doas_file=$(mktemp) 63tmp_doas_file=$(mktemp)
64cp /etc/doas.d/20-wheel.conf "$tmp_doas_file" 64cp /etc/doas.d/20-wheel.conf "$tmp_doas_file"
65for c in poweroff reboot; do 65for c in poweroff reboot ip udhcpc; do
66 printf 'permit nopass :wheel as root cmd %s\n' "$c" >> "$tmp_doas_file" 66 printf 'permit nopass :wheel as root cmd %s\n' "$c" >> "$tmp_doas_file"
67done 67done
68doas cp "$tmp_doas_file" /etc/doas.d/20-wheel.conf 68doas cp "$tmp_doas_file" /etc/doas.d/20-wheel.conf
@@ -116,6 +116,7 @@ NameResolvingService=resolvconf
116EOF 116EOF
117 117
118doas mv "$tmp_iwd_file" /etc/iwd/main.conf 118doas mv "$tmp_iwd_file" /etc/iwd/main.conf
119doas cp /dev/null /etc/network/interfaces
119 120
120doas rc-update add iwd boot 121doas rc-update add iwd boot
121doas rc-update del networking boot 122doas 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
27 battery="No battery" 27 battery="No battery"
28fi 28fi
29 29
30# NetworkManager has a dreadful command line interface
31# It makes cry every time
32# pls help
33#nwline="$(nmcli device status | head -n 2 | tail -n 1)"
34#nwclean="$(echo "$nwline" | sed 's/ *$//' | sed 's/.* //')"
35#network="Network: $nwclean"
36
37# Thank you iwctl for saving us from this dreadful existence 30# Thank you iwctl for saving us from this dreadful existence
38network="$(iwctl station wlan0 show | grep 'Connected network' | \ 31network="$(iwctl station wlan0 show | grep 'Connected network' | \
39 awk '{$1=$2=""; $0=$0; print}' | sed 's/^ .//')" 32 awk '{$1=$2=""; $0=$0; print}' | sed 's/^ .//')"
40if [ "$(cat /sys/class/net/eth0/carrier 2>/dev/null)" = 1 ]; then 33if [ "$(cat /sys/class/net/eth1/carrier 2>/dev/null)" = 1 ]; then
41 if [ -z "$network" ]; then 34 if [ -z "$network" ]; then
42 network="eth" 35 network="eth"
43 else 36 else

Generated with cgit - Back to sebastiano.tronto.net