chiark / gitweb /
[PATCH] Fix naming ethernet devices in udevstart
[elogind.git] / test / replace_test
1 #!/bin/bash
2
3 RULES=replace_test.rules
4 CONFIG=replace_test.conf
5
6 export UDEV_TEST=yes
7 export SYSFS_PATH=$PWD/sys/
8 export UDEV_CONFIG_FILE=$PWD/$CONFIG
9
10 cat > $RULES << EOF
11 KERNEL="ttyUSB0", NAME="visor"
12 EOF
13
14 cat > $CONFIG << EOF
15 udev_root="$PWD/udev/"
16 udev_db="$PWD/udev/.udev.tdb"
17 udev_rules="$PWD/$RULES"
18 udev_permissions="$PWD/udev.permissions"
19 EOF
20
21 mkdir udev
22
23 export DEVPATH=class/tty/ttyUSB0
24 export ACTION=add
25
26 ../udev tty
27 ls -l udev
28
29 export ACTION=remove
30 ../udev tty
31 ls -l udev
32
33 rm $RULES
34 rm $CONFIG
35 rm -rf udev