richardphibel / rpms / systemd

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