chiark / gitweb /
[PATCH] tweak net_test a bit.
[elogind.git] / test / modifier_test
1 #!/bin/bash
2
3 RULES=modifier_test.rules
4 CONFIG=modifier_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 BUS="scsi", place="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:bus:%b"
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 ACTION=add
24 export DEVPATH=block/sda
25
26 ../udev block
27 ls udev
28
29 export DEVPATH=block/sda/sda3
30
31 ../udev block
32 ls udev
33
34 export ACTION=remove
35 export DEVPATH=block/sda
36
37 ../udev block
38 ls udev
39
40 export DEVPATH=block/sda/sda3
41
42 ../udev block
43 ls udev
44
45 rm $RULES
46 rm $CONFIG
47 rm -rf udev