summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mdevd/mdevd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c
index 162a6f5..ed83384 100644
--- a/src/mdevd/mdevd.c
+++ b/src/mdevd/mdevd.c
@@ -803,9 +803,12 @@ static inline int run_scriptelem (struct uevent_s *event, scriptelem const *elem
if (action & elem->cmdtype)
{
- event->vars[event->varn++] = event->len ;
- memcpy(event->buf + event->len, "MDEV=", 5) ;
- event->len += 6 + nodelen ;
+ if (!event_getvar(event, "MDEV"))
+ {
+ event->vars[event->varn++] = event->len ;
+ memcpy(event->buf + event->len, "MDEV=", 5) ;
+ event->len += 6 + nodelen ;
+ }
if (dryrun)
{
strerr_warni2x("dry run: spawn ", storage + elem->command) ;