[systemd-devel] Path to a mount point that begins with <dot> causes problems

Kay Sievers kay at vrfy.org
Mon Jun 4 06:28:19 PDT 2012


On Mon, Jun 4, 2012 at 4:21 AM, Dave Reisner <d at falconindy.com> wrote:
> On Thu, May 31, 2012 at 02:14:14PM +0200, Peter Lindgren wrote:
>>
>> I'm using systemd-44 and experiencing some problems with my mount unit.
>>
>> I have an /etc/systemd/system/.aufs-normal.mount file
>> -----
>> [Unit]
>> Description=normal mount
>>
>> [Mount]
>> What=/dev/mmcblk0p5
>> Where=/.aufs/normal
>> Type=ext2
>> -----
>>
>> I am able to run 'systemctl start .aufs-normal.mount' and 'systemctl stop
>> .aufs-normal.mount' to mount/unmount /dev/mmcblk0p5 correctly.
>>
>> I then have created an /etc/systemd/system/dummy.service file
>> ------
>> [Unit]
>> Description=Dummy service
>> Requires=.aufs-normal.mount
>> After=.aufs-normal.mount
>>
>> [Service]
>> ExecStart=/bin/dummy
>> Type=oneshot
>> RemainAfterExit=yes
>> -----
>>
>> When I then run 'systemctl start dummy.service' systemd refuse to mount my
>> .aufs/normal directory.
>>
>> If I rename the '.aufs' directory to 'aufs' in the example above it works fine.
>> I have tried to escape the <dot> without any success.
>>
>> Any ideas what's causing this?
>>
>> Thanks,
>> Peter
>>
>
> This is present in 184 as well since fstab is just a source for more
> units. Best I can tell, unit files with a leading '.' are simply
> ignored.

Changed the escaping logic to always escape a leading '.'.
The mount unit should now be called:
  \x2eaufs-normal.mount

Kay


More information about the systemd-devel mailing list