B #243: Occasionally no recontextualization on CD-ROM change

pull/244/head
Vlastimil Holer 3 years ago
parent bfba520831
commit eaccee4ff4
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -12,10 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \
SUBSYSTEM=="net", ACTION=="remove", \ SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/sbin/service one-context-reconfigure-delayed restart" 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", \ SUBSYSTEM=="block", ACTION=="change", \
ENV{ID_CDROM}=="1", \ 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" RUN+="/sbin/service one-context-reconfigure restart"
# Handle disk resize # Handle disk resize

@ -12,13 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \
SUBSYSTEM=="net", ACTION=="remove", \ 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'" 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 # Change of CONTEXT CD-ROM triggers immediate reconfiguration,
# every second event and triggers systemd service one-context-reconfigure. # which stops any existing delayed reconfiguration.
# This service also stops any existing delayed reconfiguration.
SUBSYSTEM=="block", ACTION=="change", \ SUBSYSTEM=="block", ACTION=="change", \
ENV{ID_CDROM}=="1", \ ENV{ID_CDROM}=="1", \
ENV{ID_FS_TYPE}=="iso9660" ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ ENV{ID_FS_TYPE}=="iso9660", \
ENV{SEQNUM}=="*[02468]", \ 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'" RUN+="/bin/sh -c '/bin/systemctl --no-block start one-context-reconfigure.service || /usr/sbin/service one-context-reconfigure start'"
# Handle disk resize # Handle disk resize

@ -12,13 +12,12 @@ SUBSYSTEM=="net", ACTION=="add", \
SUBSYSTEM=="net", ACTION=="remove", \ SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/usr/bin/systemctl --no-block start one-context-reconfigure-delayed.service" 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 # Change of CONTEXT CD-ROM triggers immediate reconfiguration,
# every second event and triggers systemd service one-context-reconfigure. # which stops any existing delayed reconfiguration.
# This service also stops any existing delayed reconfiguration.
SUBSYSTEM=="block", ACTION=="change", \ SUBSYSTEM=="block", ACTION=="change", \
ENV{ID_CDROM}=="1", \ ENV{ID_CDROM}=="1", \
ENV{ID_FS_TYPE}=="iso9660" ENV{ID_FS_LABEL_ENC}=="CONTEXT", \ ENV{ID_FS_TYPE}=="iso9660", \
ENV{SEQNUM}=="*[02468]", \ ENV{ID_FS_LABEL_ENC}=="CONTEXT", \
RUN+="/usr/bin/systemctl --no-block start one-context-reconfigure.service" RUN+="/usr/bin/systemctl --no-block start one-context-reconfigure.service"
# Handle disk resize # Handle disk resize

Loading…
Cancel
Save