summaryrefslogtreecommitdiffstats
path: root/acompiler/acerhk/acerhk
blob: b54018f84c40b7b03373473b4d65ff1872e7e170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/acerhk
#
# Description : Lance le service pour les acer hotkey
#
# Authors     : geantbrun
#
# Version     : 00.00
#
# Notes       :
#
########################################################################

. /etc/sysconfig/rc
. ${rc_functions}

case "${1}" in
	start)
		boot_mesg "Starting Acer Hotkey Wireless LED..."
		if [ ! -f /proc/driver/acerhk/wirelessled ]; then
			echo_failure
		else
			echo 1 > /proc/driver/acerhk/wirelessled
			echo_ok
		fi;;

	stop)
		boot_mesg "Stopping Acer Hotkey Wireless LED..."
		if [ ! -f /proc/driver/acerhk/wirelessled ]; then
			echo_failure
		else
			echo 0 > /proc/driver/acerhk/wirelessled
			echo_ok
		fi;;

	restart)
		${0} stop
		sleep 1
		${0} start
		;;


	*)
		echo "Usage: ${0} {start|stop|restart}"
		exit 1
		;;
esac

# End $rc_base/init.d/acerhk