chiark / gitweb /
[PATCH] udev: cool test scripts
[elogind.git] / test.tty
1 #! /bin/sh
2 #
3 # test.tty - run udev(8) on each tty device in /sys/class/tty
4
5 SYSFSDIR=/sys           # change this for a nonstand sysfs mount point
6 BIN=./udev              # location of your udev binary
7 export ACTION=add       # 'add' or 'remove'
8
9 for i in ${SYSFSDIR}/class/tty/*; do
10         export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
11         $BIN tty
12 done