chiark / gitweb /
fix the new warnings I asked for
[elogind.git] / test / replace_test
1 #!/bin/bash
2
3 RULES=replace_test.rules
4 CONFIG=replace_test.conf
5
6 export SYSFS_PATH=$PWD/sys/
7 export UDEV_CONFIG_FILE=$PWD/$CONFIG
8
9 cat > $RULES << EOF
10 KERNEL="ttyUSB0", NAME="visor"
11 EOF
12
13 cat > $CONFIG << EOF
14 udev_root="$PWD/udev/"
15 udev_db="$PWD/udev/.udevdb"
16 udev_rules="$PWD/$RULES"
17 EOF
18
19 mkdir udev
20
21 export DEVPATH=class/tty/ttyUSB0
22 export ACTION=add
23
24 ../udev tty
25 ls -l udev
26
27 export ACTION=remove
28 ../udev tty
29 ls -l udev
30
31 rm $RULES
32 rm $CONFIG
33 rm -rf udev