start:hello_world

This commit is contained in:
dichgrem
2025-09-17 20:35:00 +08:00
parent fab38dcc54
commit 248529bd17
14 changed files with 279 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#!/bin/sh
# /usr/bin/nyn-device-info
# Helper script to get device information for NYN configuration
echo "Available network devices:"
echo "=========================="
if command -v nyn >/dev/null 2>&1; then
nyn -mode info 2>/dev/null | grep -E "(Found|device|hardware_description)" | while read line; do
echo "$line"
done
else
echo "NYN 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