teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0306-rules-reintroduce-60-alias-kmsg.rules.patch

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