diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-26 03:59:13 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-26 03:59:13 +0100 |
commit | d2f605c8d61e4c5ef129f93510ab8b38e32cee97 (patch) | |
tree | caef2facabe6dcb0e30a8c87eb476f0c0864d35d | |
parent | f7ed0d113a964aae8da4ca752d1330704adb1c65 (diff) |
find programs in /lib/udev for IMPORT if {program} is not given
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r-- | udev_rules_parse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c index 4fcd6db08e..376006c7c4 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -366,6 +366,16 @@ static int add_to_rules(struct udev_rules *rules, char *line) pos = strchr(file, ' '); if (pos) pos[0] = '\0'; + + /* allow programs in /lib/udev called without the path */ + if (strchr(file, '/') == NULL) { + strlcpy(file, "/lib/udev/", sizeof(file)); + strlcat(file, value, sizeof(file)); + pos = strchr(file, ' '); + if (pos) + pos[0] = '\0'; + } + dbg("IMPORT auto mode for '%s'", file); if (!lstat(file, &stats) && (stats.st_mode & S_IXUSR)) { dbg("IMPORT is executable, will be executed (autotype)"); |