fix: generated udev rules does not work due to incorrect line format
Problem consists of missing =sign in comparison with SUBSYSTEM and missing new line character at the end of line. As a result incremental for hot-plugs of bare disks does not work. Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
588bebfcc2
commit
c8826c3e47
8
policy.c
8
policy.c
|
@ -786,14 +786,14 @@ char *find_rule(struct rule *rule, char *rule_type)
|
|||
}
|
||||
|
||||
#define UDEV_RULE_FORMAT \
|
||||
"ACTION==\"add\", SUBSYSTEM=\"block\", " \
|
||||
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
|
||||
"ENV{DEVTYPE}==\"%s\", ENV{ID_PATH}==\"%s\", " \
|
||||
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\", "
|
||||
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\"\n"
|
||||
|
||||
#define UDEV_RULE_FORMAT_NOTYPE \
|
||||
"ACTION==\"add\", SUBSYSTEM=\"block\", " \
|
||||
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
|
||||
"ENV{ID_PATH}==\"%s\", " \
|
||||
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\", "
|
||||
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\"\n"
|
||||
|
||||
/* Write rule in the rule file. Use format from UDEV_RULE_FORMAT */
|
||||
int write_rule(struct rule *rule, int fd, int force_part)
|
||||
|
|
Loading…
Reference in New Issue