chiark / gitweb /
add option to RUN key to ignore the return value of the program
[elogind.git] / udev_rules_parse.c
index 9a12d53816e59f4dfaa50d3add57e4c243f5c925..c4fa142b04a21c078db43607acf7c178d68472c9 100644 (file)
@@ -477,7 +477,10 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
                        continue;
                }
 
-               if (strcasecmp(key, "RUN") == 0) {
+               if (strncasecmp(key, "RUN", sizeof("RUN")-1) == 0) {
+                       attr = get_key_attribute(key + sizeof("RUN")-1);
+                       if (attr && strstr(attr, "ignore_error"))
+                               rule->run_ignore_error = 1;
                        add_rule_key(rule, &rule->run, operation, value);
                        valid = 1;
                        continue;