test:luci_app_zzz

This commit is contained in:
dichgrem
2025-09-22 16:24:38 +08:00
parent 1f5a0d262f
commit 7b76d43741
11 changed files with 359 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#!/bin/sh
# /usr/bin/zzz-device-info
# Helper script to get device information for zzz configuration
echo "Available network devices:"
echo "=========================="
if command -v zzz >/dev/null 2>&1; then
zzz -mode info 2>/dev/null | grep -E "(Found|device|hardware_description)" | while read line; do
echo "$line"
done
else
echo "zzz binary not found. Showing available network interfaces:"
for dev in /sys/class/net/*; do
if [ -d "$dev" ]; then
iface=$(basename "$dev")
if [ "$iface" != "lo" ]; then
echo "Device: $iface"
if [ -f "$dev/address" ]; then
echo " MAC: $(cat "$dev/address")"
fi
if [ -f "$dev/operstate" ]; then
echo " State: $(cat "$dev/operstate")"
fi
echo ""
fi
fi
done
fi