On Tue, Oct 21, 2014 at 10:55:46PM +0200, Ronny Chevalier wrote: > >> >> + if (arg_transport != BUS_TRANSPORT_LOCAL) { > >> >> + log_error("Cannot remotely edit units"); > >> >> + return -EINVAL; > >> >> + } > >> >> + > >> >> + if (arg_runtime) { > >> >> + log_error("Cannot edit runtime units"); > >> >> + return -EINVAL; > >> >> + } > >> > > >> > Hmm, why not support this? And imply --runtime or so? > >> > >> You are right, I forgot to ask a question about this one, sorry. > >> > >> If there is a unit in /etc/systemd/system/ and someone wants to edit > >> this unit temporarily it will run systemctl --runtime myunit. The > >> problem is the unit will be copied in the /run/ directory but this > >> directory do not have precedence over /etc/systemd/, so when this unit > >> will be restarted, it won't take into account the one in /run/, right? > >> (My understanding of this come from src/shared/path-lookup.c) > > > > Indeed. We should probably print an error in this case and refuse > > operation. However we should support adding a --runtime .d/ snippet if > > a unit file is in /etc, because that will actually work fine. > I think you meant /usr/.
No, actually /etc was meant, iiuc. I updated the code to check for overriding snippets, so e.g. /run/systemd/system/getty@tty1.service.d/override.conf is allowed in /etc/systemd/sytem/getty@tty1.service exists, but not if /etc/systemd/sytem/getty@tty1.service.d/override.conf does. Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel