chiark / gitweb /
Merge gregkh@ehlo.org:/home/kay/public_html/pub/scm/linux/hotplug/udev-kay
[elogind.git] / test / net_test
1 #!/bin/bash
2
3 RULES=label_test.rules
4 CONFIG=label_test.conf
5
6 export SYSFS_PATH=$PWD/sys/
7 export UDEV_CONFIG_FILE=$PWD/$CONFIG
8
9 cat > $RULES << EOF
10 SYSFS{address}="00:e0:00:8d:9f:25", NAME="wireless"
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 ACTION=add
22 export DEVPATH=class/net/eth1
23
24 ../udevtest class/net/eth1 net
25 ls -l udev
26
27 export ACTION=remove
28 export DEVPATH=class/net/eth1
29
30 ../udevtest class/net/eth1 net
31 ls -l udev
32
33 rm $RULES
34 rm $CONFIG
35 rm -rf udev