|
|
2aacef |
From 6b5b5fefcb68cb53427747be4984531bdeddcf7e Mon Sep 17 00:00:00 2001
|
|
|
aa0848 |
From: David Tardon <dtardon@redhat.com>
|
|
|
aa0848 |
Date: Fri, 2 Jul 2021 13:25:51 +0200
|
|
|
aa0848 |
Subject: [PATCH] Copy 40-redhat.rules from RHEL-8
|
|
|
aa0848 |
|
|
|
aa0848 |
RHEL-only
|
|
|
aa0848 |
|
|
|
2aacef |
Related: #2138081
|
|
|
aa0848 |
---
|
|
|
aa0848 |
rules.d/40-redhat.rules | 46 +++++++++++++++++++++++++++++++++++++++++
|
|
|
2aacef |
rules.d/meson.build | 3 ++-
|
|
|
2aacef |
2 files changed, 48 insertions(+), 1 deletion(-)
|
|
|
aa0848 |
create mode 100644 rules.d/40-redhat.rules
|
|
|
aa0848 |
|
|
|
aa0848 |
diff --git a/rules.d/40-redhat.rules b/rules.d/40-redhat.rules
|
|
|
aa0848 |
new file mode 100644
|
|
|
aa0848 |
index 0000000000..3c95cd2df0
|
|
|
aa0848 |
--- /dev/null
|
|
|
aa0848 |
+++ b/rules.d/40-redhat.rules
|
|
|
aa0848 |
@@ -0,0 +1,46 @@
|
|
|
aa0848 |
+# do not edit this file, it will be overwritten on update
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# CPU hotadd request
|
|
|
aa0848 |
+SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# Memory hotadd request
|
|
|
aa0848 |
+SUBSYSTEM!="memory", GOTO="memory_hotplug_end"
|
|
|
aa0848 |
+ACTION!="add", GOTO="memory_hotplug_end"
|
|
|
aa0848 |
+CONST{arch}=="s390*", GOTO="memory_hotplug_end"
|
|
|
aa0848 |
+CONST{arch}=="ppc64*", GOTO="memory_hotplug_end"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+ENV{.state}="online"
|
|
|
aa0848 |
+CONST{virt}=="none", ENV{.state}="online_movable"
|
|
|
aa0848 |
+ATTR{state}=="offline", ATTR{state}="$env{.state}"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+LABEL="memory_hotplug_end"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# reload sysctl.conf / sysctl.conf.d settings when the bridge module is loaded
|
|
|
aa0848 |
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# load SCSI generic (sg) driver
|
|
|
aa0848 |
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -bv sg"
|
|
|
aa0848 |
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_target", TEST!="[module/sg]", RUN+="/sbin/modprobe -bv sg"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# Rule for prandom character device node permissions
|
|
|
aa0848 |
+KERNEL=="prandom", MODE="0644"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# Rules for creating the ID_PATH for SCSI devices based on the CCW bus
|
|
|
aa0848 |
+# using the form: ccw-<BUS_ID>-zfcp-<WWPN>:<LUN>
|
|
|
aa0848 |
+#
|
|
|
aa0848 |
+ACTION=="remove", GOTO="zfcp_scsi_device_end"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+#
|
|
|
aa0848 |
+# Set environment variable "ID_ZFCP_BUS" to "1" if the devices
|
|
|
aa0848 |
+# (both disk and partition) are SCSI devices based on FCP devices
|
|
|
aa0848 |
+#
|
|
|
aa0848 |
+KERNEL=="sd*", SUBSYSTEMS=="ccw", DRIVERS=="zfcp", ENV{.ID_ZFCP_BUS}="1"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# For SCSI disks
|
|
|
aa0848 |
+KERNEL=="sd*[!0-9]", SUBSYSTEMS=="scsi", ENV{.ID_ZFCP_BUS}=="1", ENV{DEVTYPE}=="disk", SYMLINK+="disk/by-path/ccw-$attr{hba_id}-zfcp-$attr{wwpn}:$attr{fcp_lun}"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+# For partitions on a SCSI disk
|
|
|
aa0848 |
+KERNEL=="sd*[0-9]", SUBSYSTEMS=="scsi", ENV{.ID_ZFCP_BUS}=="1", ENV{DEVTYPE}=="partition", SYMLINK+="disk/by-path/ccw-$attr{hba_id}-zfcp-$attr{wwpn}:$attr{fcp_lun}-part%n"
|
|
|
aa0848 |
+
|
|
|
aa0848 |
+LABEL="zfcp_scsi_device_end"
|
|
|
aa0848 |
diff --git a/rules.d/meson.build b/rules.d/meson.build
|
|
|
2aacef |
index 8d2878a36d..70f48e877b 100644
|
|
|
aa0848 |
--- a/rules.d/meson.build
|
|
|
aa0848 |
+++ b/rules.d/meson.build
|
|
|
2aacef |
@@ -5,7 +5,8 @@ install_data(
|
|
|
aa0848 |
install_dir : udevrulesdir)
|
|
|
aa0848 |
|
|
|
2aacef |
rules = [
|
|
|
2aacef |
- [files('60-autosuspend.rules',
|
|
|
2aacef |
+ [files('40-redhat.rules',
|
|
|
2aacef |
+ '60-autosuspend.rules',
|
|
|
2aacef |
'60-block.rules',
|
|
|
2aacef |
'60-cdrom_id.rules',
|
|
|
2aacef |
'60-drm.rules',
|