Do not use /run/udev/rules.d for udev rules
authorHarald Hoyer <harald@redhat.com>
Mon, 19 Sep 2011 10:21:51 +0000 (12:21 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 19 Sep 2011 10:21:51 +0000 (12:21 +0200)
for rules, which should not be called in the real root.

Stale rules can cause this:
https://bugzilla.redhat.com/show_bug.cgi?id=734096

modules.d/90dmsquash-live/dmsquash-live-genrules.sh
modules.d/95resume/resume-genrules.sh
modules.d/95rootfs-block/block-genrules.sh

index d6d0aa3..aa0654b 100755 (executable)
@@ -8,7 +8,7 @@ case "$root" in
             ${root#live:/dev/}
         printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
             ${root#live:/dev/}
-    } >> $UDEVRULESD/99-live-squash.rules
+    } >> /etc/udev/rules.d/99-live-squash.rules
     echo '[ -e /dev/root ]' > $hookdir/initqueue/finished/dmsquash.sh
   ;;
   live:*)
index 06b9544..e1afc26 100755 (executable)
@@ -17,7 +17,7 @@ if [ -n "$resume" ]; then
             ${resume#/dev/};
         printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
             ${resume#/dev/};
-    } >> $UDEVRULESD/99-resume-link.rules
+    } >> /etc/udev/rules.d/99-resume-link.rules
 
     {
         if [ -x /usr/sbin/resume ]; then
index 4a50aac..a2310a0 100755 (executable)
@@ -8,7 +8,7 @@ if [ "${root%%:*}" = "block" ]; then
             ${root#block:/dev/}
         printf 'SYMLINK=="%s", SYMLINK+="root"\n' \
             ${root#block:/dev/}
-    } >> $UDEVRULESD/99-root.rules
+    } >> /etc/udev/rules.d/99-root.rules
 
     printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \
         "${root#block:}" "${root#block:}" > $hookdir/initqueue/settled/blocksymlink.sh