Bug 76623 - systemctl cannot reset default.target
Summary: systemctl cannot reset default.target
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Djalal Harouni
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 09:05 UTC by code
Modified: 2014-04-17 03:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description code 2014-03-26 09:05:14 UTC

    
Comment 1 code 2014-03-26 09:07:07 UTC
systemctl set-default works only once, then you have to manually delete the symlink in /etc/systemd/system/default.target

progandy@pamobile /tmp % sudo sc set-default graphical.target             :(
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'
progandy@pamobile /etc/systemd/system % sudo sc set-default multi-user.target
Failed to set default target: File exists
1 progandy@pamobile /etc/systemd/system % sudo sc set-default graphical.target
progandy@pamobile /etc/systemd/system % sudo sc set-default multi-user.target
Failed to set default target: File exists
progandy@pamobile /etc/systemd/system % sudo rm default.target
progandy@pamobile /tmp % sudo sc set-default graphical.target             :(
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'
Comment 2 Djalal Harouni 2014-04-14 00:10:17 UTC
Hi,

Adding the "--force" switch will help you to work around this.

There is a patch at:
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018659.html

Thanks!
Comment 3 Zbigniew Jedrzejewski-Szmek 2014-04-17 03:14:45 UTC
Patch applied in http://cgit.freedesktop.org/systemd/systemd/commit/?id=a1484a2.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.