Folks,
I also have a question regarding how to include a board dependent
base-file file in the source tree.
More specifically, the file is a hotplug script to get the wireless
led work on the buffalo's wlae-ag300n. The wireless led on this board
is not connected to the phy, but controlled independently by gpios.
The script sets up the ledtrig-netdev upon detection of an addition
of a wireless device on wlae-ag300n, and it is written so that it will
ignore other boards.
I wonder if there is a way to specify board-dependent base-file files
so that this script does not go into images for other boards, or
better yet, if there is a way to do this better.
FYI, the script follows.
#!/bin/sh
#
# Manipulate Buffalo WLAE-AG300N wireless led (green only)
#
# If the blinking led is annoying, set the ledmode to "link"
ledmode="link tx rx"
# Check if the device is wireless first, to prevent ar71xx.sh
# from being read.
if [ -e /sys$DEVPATH/phy80211 ]; then
. /lib/ar71xx.sh
if [ `ar71xx_board_name` != "wlae-ag300n" ]; then
exit 0
fi
leddev=/sys/class/leds/buffalo\:green\:wireless
if [ $ACTION = "add" ]; then
echo netdev > $leddev/trigger
echo $DEVICENAME > $leddev/device_name
echo $ledmode > $leddev/mode
elif [ $ACTION = "remove" ]; then
echo none > $leddev/trigger
fi
fi
--- shinoda
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel