ordered into /lib

put all subscripts into lib for readability
This commit is contained in:
2026-07-14 16:56:28 +02:00
parent 925c624351
commit 20781c9d90
11 changed files with 6 additions and 20 deletions

27
lib/lan.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
function LAN_CABLE(){
for iface in /sys/class/net/*; do
iface_name=$(basename "$iface")
if [[ "$iface_name" == "lo" ]]; then
continue
fi
if [[ "${iface_name:0:2}" == "wl" ]]; then
continue
fi
if [[ -f "$iface/carrier" ]]; then
carrier=$(cat "$iface/carrier")
if [[ "$carrier" == "1" ]]; then
echo "Bitte LAN Kabel entfernen"
read -n 1 -s -r -p "Any key to continue"
return 0
fi
fi
done
echo "LAN cable is NOT connected"
return 1
}