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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
Source: bl
Section: utils
Priority: optional
Maintainer: Piotr Roszatycki <dexter@debian.org>
Standards-Version: 3.5.6
Upstream-Source: <URL:ftp://sunsite.unc.edu/pub/Linux/system/misc/>
Description: blink Keyboard LEDs
Packaged-For: Debian
Copyright: GPL
Copyright (C) 1994 - 1996 Greg Hankins <greg.hankins@cc.gatech.edu>
Scroll lock support (-S option):
Copyright (C) 1994 Ed Doolittle <dolittle@math.toronto.edu>
.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Major-Changes:
[001] included daemon() function
[002] new -s switch for single blink
[003] added -w switch with copyright info
Patches: *.diff
Build: sh
CC=gcc
CFLAGS="-O2 -Wall"
LDFLAGS=
if [ "${DEB_BUILD_OPTIONS#*debug}" != "$DEB_BUILD_OPTIONS" ]; then
CFLAGS="$CFLAGS -g"
fi
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CC="$CC"
Clean: sh
make clean || true
Package: bl
Architecture: any
Description: Blink Keyboard LEDs.
bl blinks the keyboard LEDs: the Num Lock, the Caps Lock, and the Scroll Lock.
bl is a very helpful monitor of server's state. Blinking speed could tell
about CPU load.
Install: sh
yada install -bin bl
yada install -doc -as changelog CHANGES
yada install -man bl.1
yada install -conffile -subdir default -as bl debian/bl.default
yada strip
yada dpkg-shlibdeps
Init: sh
start 10 2 3 4 5 .
.
. /etc/default/bl
.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/bl
NAME=bl
DESC="blinkenlights"
.
test -f $DAEMON || exit 0
.
# set DEVICE_PREFIX depending on devfs
if [ "`grep -c devfs /proc/filesystems`" -a -d /dev/vc ]; then
DEVICE_PREFIX="vc/"
else
DEVICE_PREFIX="tty"
fi
.
case "$1" in
start)
echo -n "Starting $DESC: "
# start and stop bl for each tty
# this is ugly hack - after that bl blinks for all ttys
start-stop-daemon --start --quiet --exec $DAEMON -- ${DEVICE_PREFIX}1
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- ${DEVICE_PREFIX}1
for i in 2 3 4 5 6 7 8 9 10 11 12; do
start-stop-daemon --start --quiet --pidfile /dev/null \
--exec $DAEMON -- ${DEVICE_PREFIX}$i
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- ${DEVICE_PREFIX}$i
done
sleep 1
# start bl again for tty1
nice -n 20 \
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS ${DEVICE_PREFIX}1
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- ${DEVICE_PREFIX}1
sleep 1
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- ${DEVICE_PREFIX}1
sleep 1
nice -n 20 \
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS ${DEVICE_PREFIX}1
echo "$NAME."
;;
*)
N=/etc/init.d/$N
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
|