'Twas brillig, and Markus Rathgeb at 09/03/13 08:20 did gyre and gimble:
> Hi!
> 
> I am using a NAS and want to create .mount and .automount service files
> for the shared.
> The service files differs only by the name of the share and mount target.
> 
> So I thought I use a "@" template for that.
> I created a file "mnt-NAS@.automount" (same for .mount with different
> content, but the same Alias logic):
> ===
> [Unit]
> Description=Automatically mount the NAS share %I
> 
> [Install]
> Alias=mnt-NAS-%I.automount
> 
> [Automount]
> Where=/mnt/NAS/%I
> ===
> 
> If I use "systemctl enable" the symlink is not greated as expected:
> ln -s '/etc/systemd/system/mnt-NAS@.automount'
> '/etc/systemd/system/mnt-NAS-%I.automount'
> 
> What have I to change?
> Or is this not supported? Why?


Currently I believe all mount units have to be named after their
mountpoint, so using template units for mounts just isn't possible.

Regarding specifier support in Alias, this is somewhat relevant the
discussion in the thread "[PATCH] units: Make getty@.service install
rule generic."... not identical by any means but related.

Col




-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to