On Tue, 12.01.16 21:23, Stefan Schweter (ste...@schweter.it) wrote: > Dear systemd-users, > > e.g. when a container name includes a minus sign like: > > ls -l /var/lib/machines > insgesamt 4 > drwxr-xr-x 22 root root 4096 12. Jan 21:14 host.cis.uni-muenchen.de > > Enabling the systemd-nspawn service with: > > systemctl enable systemd-nsp...@host.cis.uni-muenchen.de > Created symlink from > /etc/systemd/system/machines.target.wants/systemd-nsp...@host.cis.uni-muenchen.de.service > to /usr/lib/systemd/system/systemd-nspawn@.service.
Yeah, the way systemd encodes slashes in unit names is by converting them to dots. Thus when you actually want a dash you need to escape it. The tool systemd-escape can help you with getting this right from shell scripts. See the last example in the systemd-escape(1) man page For details. But, given that this is a bit nasty to use, you can alternatively just use "machinectl start ..." and "machinectl enable ..." which will do the escaping for you, prefix the systemd-nspawn@ thing and the suffix the .service thing, and is otherwise equvialent to systemctl start and systemctl enable. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel