On 11/18/12 5:54 PM, Colin Guthrie wrote:


Just as a general observation, I don't think you even need to delve into
udev rules to make all this work as systemd handles device mounts
internally.


You can simply create a .mount unit for your drive such that when it is
inserted it is mounted automatically (you may have to BindTo= and After=
the corresponding .device unit for the external drive IIUC).

Then, simply adjust your ext-usb-backup.service to
BindTo=your-mount-unit.mount and After=your-mount-unit.mount

This means that whenever the mount unit is started (i.e. when ever it's
mounted), your service is started immediately after mount.


Col

Col,
Thx for replay.
I'm not sure is it possible to launch different actions by different vol.labels within .mount unit.
I have USB HDDs with backups, TVarchives, movies and software.
Idea is to have solution when attaching USB HDD automatically launches appropriate script supporting expected actions (like start backup or auto add movies to library).
It is possible to achieve this .mount units ?
br

<<attachment: warpme.vcf>>

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to