summaryrefslogtreecommitdiff
path: root/target/linux/rdc/base-files/default/etc/diag.sh
blob: 8d5c38262c552adb65991513a874d6fc2e50edb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# Copyright (C) 2007 OpenWrt.org

set_led() {
	local led="$1"
	local state="$2"
	[ -d "/sys/class/leds/rdc321x:$led" ] && echo "$state" > "/sys/class/leds/rdc321x:$led/brightness"
}

set_state() {
	case "$1" in
		preinit)
			set_led dmz 1
		;;
		done)
			set_led dmz 0
		;;
	esac
}