chiark / gitweb /
create_floppy_devices: add tool to create floppy nodes based on sysfs info
[elogind.git] / test / replace_test
old mode 100644 (file)
new mode 100755 (executable)
index 3aa8d5a..6e01f28
@@ -1,14 +1,33 @@
 #!/bin/bash
 
-export UDEV_TEST=yes
+RULES=replace_test.rules
+CONFIG=replace_test.conf
+
 export SYSFS_PATH=$PWD/sys/
-export UDEV_CONFIG_DIR=$PWD/
-export UDEV_ROOT=$PWD/udev/
-export UDEV_DB=udev.tdb
-export UDEV_CONFIG_FILE=replace_test.config
-export UDEV_PERMISSION_FILE=udev.permissions
+export UDEV_CONFIG_FILE=$PWD/$CONFIG
+
+cat > $RULES << EOF
+KERNEL="ttyUSB0", NAME="visor"
+EOF
+
+cat > $CONFIG << EOF
+udev_root="$PWD/udev/"
+udev_db="$PWD/udev/.udevdb"
+udev_rules="$PWD/$RULES"
+EOF
+
+mkdir udev
 
 export DEVPATH=class/tty/ttyUSB0
 export ACTION=add
 
 ../udev tty
+ls -l udev
+
+export ACTION=remove
+../udev tty
+ls -l udev
+
+rm $RULES
+rm $CONFIG
+rm -rf udev