From eaccee4ff48146aad36f83fd4242b2eed20a770a Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Mon, 16 Aug 2021 11:07:37 +0200 Subject: [PATCH] B #243: Occasionally no recontextualization on CD-ROM change --- src/lib/udev/rules.d/65-context.rules##apk.one | 6 ++++-- src/lib/udev/rules.d/65-context.rules##deb.one | 9 ++++----- src/lib/udev/rules.d/65-context.rules##rpm.systemd.one | 9 ++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/udev/rules.d/65-context.rules##apk.one b/src/lib/udev/rules.d/65-context.rules##apk.one index fc960b1..46dc5ad 100644 --- a/src/lib/udev/rules.d/65-context.rules##apk.one +++ b/src/lib/udev/rules.d/65-context.rules##apk.one @@ -12,10 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \ SUBSYSTEM=="net", ACTION=="remove", \ RUN+="/sbin/service one-context-reconfigure-delayed restart" -# On CONTEXT CD-ROM change the immediate reconfiguration is triggered. +# Change of CONTEXT CD-ROM triggers immediate reconfiguration, +# which stops any existing delayed reconfiguration. SUBSYSTEM=="block", ACTION=="change", \ ENV{ID_CDROM}=="1", \ - ENV{ID_FS_TYPE}=="iso9660" ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ + ENV{ID_FS_TYPE}=="iso9660", \ + ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ RUN+="/sbin/service one-context-reconfigure restart" # Handle disk resize diff --git a/src/lib/udev/rules.d/65-context.rules##deb.one b/src/lib/udev/rules.d/65-context.rules##deb.one index 66df97b..4765c67 100644 --- a/src/lib/udev/rules.d/65-context.rules##deb.one +++ b/src/lib/udev/rules.d/65-context.rules##deb.one @@ -12,13 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \ SUBSYSTEM=="net", ACTION=="remove", \ RUN+="/bin/sh -c '/bin/systemctl --no-block start one-context-reconfigure-delayed.service || /usr/sbin/service one-context-reconfigure-delayed start'" -# When CONTEXT CD-ROM is changed, it generates 2 events. This rule takes -# every second event and triggers systemd service one-context-reconfigure. -# This service also stops any existing delayed reconfiguration. +# Change of CONTEXT CD-ROM triggers immediate reconfiguration, +# which stops any existing delayed reconfiguration. SUBSYSTEM=="block", ACTION=="change", \ ENV{ID_CDROM}=="1", \ - ENV{ID_FS_TYPE}=="iso9660" ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ - ENV{SEQNUM}=="*[02468]", \ + ENV{ID_FS_TYPE}=="iso9660", \ + ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ RUN+="/bin/sh -c '/bin/systemctl --no-block start one-context-reconfigure.service || /usr/sbin/service one-context-reconfigure start'" # Handle disk resize diff --git a/src/lib/udev/rules.d/65-context.rules##rpm.systemd.one b/src/lib/udev/rules.d/65-context.rules##rpm.systemd.one index 20890df..068dff5 100644 --- a/src/lib/udev/rules.d/65-context.rules##rpm.systemd.one +++ b/src/lib/udev/rules.d/65-context.rules##rpm.systemd.one @@ -12,13 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \ SUBSYSTEM=="net", ACTION=="remove", \ RUN+="/usr/bin/systemctl --no-block start one-context-reconfigure-delayed.service" -# When CONTEXT CD-ROM is changed, it generates 2 events. This rule takes -# every second event and triggers systemd service one-context-reconfigure. -# This service also stops any existing delayed reconfiguration. +# Change of CONTEXT CD-ROM triggers immediate reconfiguration, +# which stops any existing delayed reconfiguration. SUBSYSTEM=="block", ACTION=="change", \ ENV{ID_CDROM}=="1", \ - ENV{ID_FS_TYPE}=="iso9660" ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ - ENV{SEQNUM}=="*[02468]", \ + ENV{ID_FS_TYPE}=="iso9660", \ + ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ RUN+="/usr/bin/systemctl --no-block start one-context-reconfigure.service" # Handle disk resize