Skip to content

Commit

Permalink
Fixupo 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Apr 11, 2021
1 parent 79488cd commit 155ffa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions udev/rules.d/91-mountsd.rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ KERNEL=="sd*", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_ME
#ENV{DEVTYPE}=="disk", ENV{UDISKS_CAN_POWER_OFF}="1"

# Match ENV{ID_FS_USAGE}=="filesystem" for all selected devices
ENV{ID_FS_USAGE}=="filesystem", ACTION=="add|change", ENV{UDISKS_SYSTEM}="0", ENV{UDISKS_AUTO}="0", ENV{UDISKS_NAME}="mountsd_dev-%k", MODE="0660", ENV{MOUNTSD_ACTIVE}="1", TAG+="systemd", ENV{SYSTEMD_WANTS}="'mount-sd@%k.service'"
ENV{ID_FS_USAGE}=="filesystem", ACTION=="add|change", ENV{UDISKS_SYSTEM}="0", ENV{UDISKS_AUTO}="0", ENV{UDISKS_NAME}="mountsd_dev-%k", MODE="0660", ENV{MOUNTSD_ACTIVE}="1", TAG+="systemd", ENV{SYSTEMD_WANTS}="mount-sd@%k.service"
# When above detected and assigned devices are removed
ENV{MOUNTSD_ACTIVE}=="1", ACTION=="remove", ENV{MOUNTSD_ACTIVE}="0", ENV{UDISKS_NAME}="mountsd_removed", ENV{SYSTEMD_WANTS}="", ENV{SYSTEMD_USER_WANTS}="", RUN{program}+="/usr/bin/systemctl stop mount-sd@%k.service"
ENV{MOUNTSD_ACTIVE}=="1", ACTION=="remove", ENV{MOUNTSD_ACTIVE}="0", ENV{UDISKS_NAME}="mountsd_removed", ENV{SYSTEMD_WANTS}="", ENV{SYSTEMD_USER_WANTS}="", RUN{program}+="/bin/systemctl stop mount-sd@%k.service"

LABEL="mountsd_end"

Expand Down

0 comments on commit 155ffa7

Please sign in to comment.