[systemd-devel] [PATCH] fstab-generator: avoid mangling mount source and dest

Lennart Poettering lennart at poettering.net
Tue Jun 19 11:37:43 PDT 2012


On Mon, 04.06.12 09:45, Dave Reisner (d at falconindy.com) wrote:

> Not the most convenient thing to type, but it gets the job done:
> 
> $ systemctl status '\x2esnap.mount'
> \x2esnap.mount - /.snap
>           Loaded: loaded (/etc/fstab)
>           Active: active (mounted) since Mon, 04 Jun 2012 09:40:09 -0400; 1min 4s ago
>            Where: /.snap
>             What: tmpfs
>          Process: 170 ExecMount=/bin/mount tmpfs /.snap -t tmpfs (code=exited, status=0/SUCCESS)
>           CGroup: name=systemd:/system/\x2esnap.mount
> 
> Could systemctl do the escaping for the user, or is that too drastic of an
> interface change?

Yes, systemctl should totally do the escaping for the user. There's
actually an item on the todo list for this.

i.e. I'd actually like to see that you can do:

   systemctl start /home

which is implicitly translated to "systemctl start home.mount". Of
course with "systemctl status /home" this would be even more useful.

And I'd like to see:

   systemctl start foobar@üxknürz.service

which automatically escapes the two umlauts.

That said, it would probably be hard to escape paths that are embedded
within a name, simply because we escape paths differently from other
strings, and we wouldn't know which way to escape things just by looking
at it if it is embedded. If it isn't embedded this becomes much easier
of course...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list