[systemd-devel] [PATCH] systemctl: allow to change the default target without the --force switch
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Wed Apr 16 19:59:01 PDT 2014
On Thu, Apr 17, 2014 at 01:41:51AM +0100, Djalal Harouni wrote:
> On Mon, Apr 14, 2014 at 01:07:52AM +0100, Djalal Harouni wrote:
> > Currently "systemctl set-default" will fail to change the default target
> > due to the 'default.target' being a symlink which is always the case.
> >
> > To work around this, the user must specify the "--force" switch to be
> > able to overwrite the existing symlink.
> >
> > This is clearly a regression that was introduced by commit 718db96199e
> > since it worked before without the "--force" switch and the man pages do
> > not mention that you need to specify it. It is expected that this is a
> > symlink.
> >
> > So just explicity set the force flag to make it work again.
> BTW, I've a question, why there is this item in the TODO:
> "systemctl --root=container/ set-default ... is totally borked."
>
> Can someone please shed some light on this?
I added this, and I guess I should have been more specific, because I had
to test this again, to see what is wrong :)
systemctl --root=/var/tmp/inst1 set-default multi-user.target
creates a symlink /var/tmp/inst1//usr/etc/systemd/system/default.target -> /var/tmp/inst1//lib/systemd/system/multi-user.target, i.e. leaks the container name.
Zbyszek
More information about the systemd-devel
mailing list