[systemd-devel] systemd195: issue with udev launched script

Warpme warpme at o2.pl
Sun Nov 18 10:38:43 PST 2012


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: warpme.vcf
Type: text/x-vcard
Size: 83 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121118/a6f3df99/attachment.vcf>


More information about the systemd-devel mailing list