[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 20:14:11 PDT 2014
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.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=76623
>
> Reported-by: <code at progandy.de>
Applied.
> ---
> Hi, I took the easy path. I did not want to change the bus signature of
> SetDefaultTarget() but I think that unit_file_set_default() should not
> have that extra "force" argument, then replace 'force' with 'true'
> in create_symlink().
I think it's fine as is. It's not worth breaking the dbus compatibility.
Zbyszek
More information about the systemd-devel
mailing list