Bug 726881 - systemctl enable ignores init levels
Summary: systemctl enable ignores init levels
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-30 09:36 UTC by Nicolas Mailhot
Modified: 2011-08-01 19:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-01 19:05:21 UTC
Type: ---


Attachments (Terms of Use)

Description Nicolas Mailhot 2011-07-30 09:36:18 UTC
Description of problem:

systemctl enable ignores init levels

Version-Release number of selected component (if applicable):

$ rpm -qa systemd*|sort
systemd-30-1.fc16.x86_64
systemd-gtk-30-1.fc16.x86_64
systemd-sysv-30-1.fc16.x86_64
systemd-units-30-1.fc16.x86_64

How reproducible:

Always

Steps to Reproduce:
1. move to non default init level (for example single)
2. try to enable a new service
  
Actual results:

The service is enabled in default init level


Expected results:

The service is enabled in current init level

Comment 1 Lennart Poettering 2011-08-01 19:05:21 UTC
Hmm?

systemd does not support "init levels".

We do support "targets", of which multiple can be active at the same time. There is hence no such thing as "current target", since there are multiple.

"systemctl enable" enables a unit the way suggested in the [Install] section in the unit file, and independent of the current system state. If you want to manually hook in units in other targets, then do so manually by symlinking the unit file into a .wants/ directory of the target.

For example, bluetooth.service is by default started only if bluetooth.target is active. If you also want to start it when "multi-user.target" is active, then do:

mkdir -p /etc/systemd/system/multi-user.target.wants/
ln -sf /lib/systemd/system/bluetooth.service /etc/systemd/system/multi-user.target.wants/


Note You need to log in before you can comment on or make changes to this bug.