2003-10-18 13:54:14 +07:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# test.tty - run udev(8) on each tty device in /sys/class/tty
|
2003-07-17 10:17:20 +07:00
|
|
|
|
2003-10-21 12:45:46 +07:00
|
|
|
if [ $# = "0" ] ; then
|
|
|
|
echo
|
|
|
|
echo "usage: $0 <action>"
|
|
|
|
echo "where <action> is \"add\" or \"remove\""
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2003-10-18 13:54:14 +07:00
|
|
|
SYSFSDIR=/sys # change this for a nonstand sysfs mount point
|
2003-11-24 21:13:05 +07:00
|
|
|
BIN=../udev # location of your udev binary
|
2003-10-21 12:45:46 +07:00
|
|
|
export ACTION=$1 # 'add' or 'remove'
|
2003-04-11 00:53:25 +07:00
|
|
|
|
2003-10-18 13:54:14 +07:00
|
|
|
for i in ${SYSFSDIR}/class/tty/*; do
|
2003-11-19 17:39:39 +07:00
|
|
|
export DEVPATH=${i#${SYSFSDIR}}
|
2003-10-18 13:54:14 +07:00
|
|
|
$BIN tty
|
|
|
|
done
|