summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-25 18:58:49 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-25 18:58:49 +0200
commit319c6700165dc38d7f813ff646bff0196f2aafe6 (patch)
tree9f69648054cecf9e3a8d8a17ce313f30a69ebab9 /udev_rules_parse.c
parentbe4bedd16b934c8663f8c231f07f23091cde8261 (diff)
IMPORT allow to import program returned keys into the env
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 121236820b..4979feddc1 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -375,7 +375,12 @@ static int rules_parse(const char *filename)
continue;
}
- if (strcasecmp(key, KEY_IMPORT) == 0) {
+ if (strncasecmp(key, KEY_IMPORT, sizeof(KEY_IMPORT)-1) == 0) {
+ attr = get_key_attribute(key + sizeof(KEY_IMPORT)-1);
+ if (attr && strstr(attr, "exec")) {
+ dbg(KEY_IMPORT" will be executed");
+ rule.import_exec = 1;
+ }
strlcpy(rule.import, value, sizeof(rule.import));
rule.import_operation = operation;
valid = 1;
@@ -411,7 +416,6 @@ static int rules_parse(const char *filename)
dbg("creation of partition nodes requested");
rule.partitions = DEFAULT_PARTITIONS_COUNT;
}
- /* FIXME: remove old style option and make OPTIONS= mandatory */
if (strstr(attr, OPTION_IGNORE_REMOVE) != NULL) {
dbg("remove event should be ignored");
rule.ignore_remove = 1;