]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/test.tty
[PATCH] Makefile tweaks for the DBUS build.
[thirdparty/systemd.git] / test / test.tty
1 #! /bin/sh
2 #
3 # test.tty - run udev(8) on each tty device in /sys/class/tty
4
5 if [ $# = "0" ] ; then
6 echo
7 echo "usage: $0 <action>"
8 echo "where <action> is \"add\" or \"remove\""
9 echo
10 exit 1
11 fi
12
13 SYSFSDIR=/sys # change this for a nonstand sysfs mount point
14 BIN=../udev # location of your udev binary
15 export ACTION=$1 # 'add' or 'remove'
16
17 for i in ${SYSFSDIR}/class/tty/*; do
18 export DEVPATH=${i#${SYSFSDIR}}
19 $BIN tty
20 done