[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Error while trying to install openssh-server on Buster



On Thu, Jul 23, 2020 at 01:26:50PM +0300, Andrei POPESCU wrote:
Seriously?

Yes seriously. This is a pain point that could be avoided. I'm not a
systemd hater. I do some quite advanced things with it. But I don't
think it's above criticism, and this is an area I feel is worthy of
criticism.

Could you please show me how would I create a file on *nix
containing '/' in the name?

The presumption here is that unit names must be stored in files matching their name. That's a design choice.

and also to map all mounts to units.

What's wrong with that?

As I point out in the rest of my mail, it's a combination of both
decisions that results in some seriously unfriendly unit names.

'/' gets remapped to '-', which is otherwise
forbidden.

Using '-' to mean '/' allows mount units to have friendly names like
media-data.mount (the mount unit must be named according to the mount
point).

'-' is too commonly used in paths IMHO, to have been a good choice.
dev-disk-by\x2duuid-e0eed9b6\x2d03f1\x2d41ed\x2d80a4\x2dc7cc4ff013c3.device
is anything but friendly, and I have many such unit names that I
reference as dependencies of others etc.

The delimiter need not have been one character: a two character
delimiter could have significantly decrease the need for escaping and
remained legible. Even '--'.

I will argue that UUIDs are not really meant for human consumption
anyway, so the damage done is reduced.

UUIDs are just one thing that expose this. the "by-uuid" part of the
path there also needs escaping, as does "by-label"; any labels that
happen to use '-', or VG or LV group names, etc.

There is also 'systemd-escape' to help with conversions.

I didn't know about systemd-escape, thanks: that's a help, but I still
feel that if some of the design decisions had been different, some pain
could be avoided.




--
Please do not CC me, I am subscribed to the list.

👱🏻	Jonathan Dowland
✎	 jmtd@debian.org
🔗	https://jmtd.net


Reply to: