But really, if you want to know when messages appear on a log console,
then something like
#!/bin/sh
# call: chvt_on_event N
N=$1
VT=/dev/vcs$N
OLD=/tmp/.chvtoe$$
NEW=/tmp/.chvtoe$$x
cat $VT > $OLD
while true; do
sleep 1
cat $VT > $NEW
if ! cmp -s $OLD $NEW ; then
mv $NEW $OLD
chvt $N
fi
done
would do.
Add parameter checking and removal of temp files on exit.
Replace the chvt $N by an echo ^G if you only want a beep.
A C version would be a single page of code.
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/