From c8826c3e47dc25e3ad1bb6b747d7cad9dfb0eaa3 Mon Sep 17 00:00:00 2001 From: "Hawrylewicz Czarnowski, Przemyslaw" Date: Tue, 8 Mar 2011 09:51:31 +1100 Subject: 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 Signed-off-by: NeilBrown --- policy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'policy.c') diff --git a/policy.c b/policy.c index afb640f5..ebb14814 100644 --- a/policy.c +++ b/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) -- cgit v1.2.3