c2dfb7
From b7f9d757dd6f276203b8b04f0c0ba1c61bcf8937 Mon Sep 17 00:00:00 2001
c2dfb7
From: Jan Synacek <jsynacek@redhat.com>
c2dfb7
Date: Wed, 18 Dec 2019 09:41:29 +0100
c2dfb7
Subject: [PATCH] rules: reintroduce 60-alias-kmsg.rules
c2dfb7
c2dfb7
Resolves:#1739353
c2dfb7
rhel-only
c2dfb7
---
c2dfb7
 rules/60-alias-kmsg.rules | 10 ++++++++++
c2dfb7
 rules/meson.build         |  1 +
c2dfb7
 2 files changed, 11 insertions(+)
c2dfb7
 create mode 100644 rules/60-alias-kmsg.rules
c2dfb7
c2dfb7
diff --git a/rules/60-alias-kmsg.rules b/rules/60-alias-kmsg.rules
c2dfb7
new file mode 100644
c2dfb7
index 0000000000..9c7236a730
c2dfb7
--- /dev/null
c2dfb7
+++ b/rules/60-alias-kmsg.rules
c2dfb7
@@ -0,0 +1,10 @@
c2dfb7
+SUBSYSTEM!="block", GOTO="log_end"
c2dfb7
+KERNEL=="loop*|ram*", GOTO="log_end"
c2dfb7
+ACTION=="remove", GOTO="log_end"
c2dfb7
+ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="log_end"
c2dfb7
+ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="log_end"
c2dfb7
+
c2dfb7
+IMPORT{cmdline}="udev.alias"
c2dfb7
+ENV{udev.alias}=="1", RUN+="/bin/sh -c 'echo udev-alias: $name \($links\) > /dev/kmsg'"
c2dfb7
+
c2dfb7
+LABEL="log_end"
c2dfb7
diff --git a/rules/meson.build b/rules/meson.build
c2dfb7
index 6363f8bf2e..7b5b2472de 100644
c2dfb7
--- a/rules/meson.build
c2dfb7
+++ b/rules/meson.build
c2dfb7
@@ -3,6 +3,7 @@
c2dfb7
 rules = files('''
c2dfb7
         40-redhat.rules
c2dfb7
         40-elevator.rules
c2dfb7
+        60-alias-kmsg.rules
c2dfb7
         60-block.rules
c2dfb7
         60-cdrom_id.rules
c2dfb7
         60-drm.rules