4 # Script to take care of ifled initialization on each led as defined
7 # Taken from Mandriva and modified for ArchLinux by Gilles CHAUVIN <gcnweb@gmail.com>
13 CONFIG
="/etc/sysconfig/ifled"
15 # Check if config file is present
16 if [ -f ${CONFIG} ]; then
19 echo "File ${CONFIG} is missing. Aborting!"
23 PID
=`pidof -o %PPID /usr/sbin/ifled`
27 if [ ! -z "$IF1" ] && /sbin
/ifconfig |
grep -q "$IF1" ; then
28 stat_busy
"Starting InterfaceLED (\"$IF1\" on NumLock)"
29 [ -z "$PID" ] && /usr
/sbin
/ifled console
"$IF1" -f -c ann
38 if [ ! -z "$IF2" ] && /sbin
/ifconfig |
grep -q "$IF2" ; then
39 stat_busy
"Starting InterfaceLED (\"$IF2\" on CapsLock)"
40 [ -z "$PID" ] && /usr
/sbin
/ifled console
"$IF2" -f -c nan
49 if [ ! -z "$IF3" ] && /sbin
/ifconfig |
grep -q "$IF3" ; then
50 stat_busy
"Starting InterfaceLED (\"$IF3\" on ScrollLock)"
51 [ -z "$PID" ] && /usr
/sbin
/ifled console
"$IF3" -f -c nna
63 stat_busy
"Stopping InterfaceLED"
64 [ ! -z "$PID" ] && kill $PID &> /dev
/null
81 echo "usage: $0 {start|stop|restart}" >&2