summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-08-26 21:38:18 +0200
committerKay Sievers <kay.sievers@suse.de>2005-08-26 21:38:18 +0200
commit8f847bb8455f7db8f26893b167fbf8a09cf8f41b (patch)
tree564a15a2896b7162267795053ae83d0b6127ddad /udev_rules.c
parentc4ef16f92c56d2f4d8990625212fd27c805425cb (diff)
store ENV{key}="value" exported keys in the database
Just like the IMPORT values are stored in the udev database the exported keys are stored in the udev database. The database is also imported on a remove event before the rules are matched. So it is possible to do: ACTION=="add", KERNEL=="sda", ENV{MY_DEVICE}="1234", RUN+="/bin/logger add $devpath" ACTION=="remove", ENV{MY_DEVICE}=="1234", RUN+="/bin/logger remove $devpath" Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/udev_rules.c b/udev_rules.c
index 647875d9a9..6c6aa0f091 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -859,6 +859,7 @@ try_parent:
const char *key_name = key_pair_name(rule, pair);
const char *value = key_val(rule, &pair->key);
+ name_list_key_add(&udev->env_list, key_name, value);
setenv(key_name, value, 1);
dbg("export ENV '%s=%s'", key_name, value);
}