1

I want to update some files on portable usb drive when it connects to my desktop with Ubuntu 18.04. I can do it with a script, but for this, a destination location (FS mountpoint) must be determined.

How system can trigger myscript <mountpoint> when drive, specified by label or VENDOR_ID:MODEL_ID, is pluged & mounted?

  • With udev I can specify a permanent mountpoint, and hardcode it. May works, but collides with the existing standard environment (udisks2, etc).

  • With systemd solution (https://askubuntu.com/a/679600/110476) in a unit I also cant specify a mountpoint as a script parameter.

Is there a universal and portable solution for this problem?

bvasiliev
  • 471

0 Answers0