1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
The systemd System and Service Manager
Go to file
Zbigniew Jędrzejewski-Szmek 4910b35078 systemctl: when removing enablement or mask symlinks, cover both /run and /etc
'systemctl disable --runtime' would disable a unit, but only if it was enabled
with '--runtime', and silently do nothing if the unit was enabled persistently.
And similarly 'systemctl disable' would do nothing if the unit was enabled in
/run. This just doesn't seem useful.

This pathch changes enable/disable and mask/unmask to be asymmetrical. enable
and mask create symlinks in /etc or /run, depending on whether --runtime was
specified. disable and unmask remove symlinks from both locations. --runtime
cannot be specified for the disable and unmask verbs.

The advantage is that 'disable' now means that the unit is disabled, period.
And similarly for 'unmask', all masks are removed.

Similarly for preset and preset-all, they now cannot be called with --runtime,
and are asymmetrical: when they enable a unit, symlinks are created in /etc.
When they disable a unit, all symlinks are nuked.

$ systemctl --root=/ enable bluetooth
Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ --runtime enable bluetooth
Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ disable bluetooth
Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /run/systemd/system/dbus-org.bluez.service.
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /etc/systemd/system/dbus-org.bluez.service.
$ systemctl --root=/ disable --runtime bluetooth
--runtime cannot be used with disable

$ systemctl --root=/ mask --runtime bluetooth
Created symlink /run/systemd/system/bluetooth.service → /dev/null.
$ systemctl --root=/ mask bluetooth
Created symlink /etc/systemd/system/bluetooth.service → /dev/null.
$ systemctl --root=/ unmask bluetooth
Removed /run/systemd/system/bluetooth.service.
Removed /etc/systemd/system/bluetooth.service.
$ systemctl --root=/ unmask --runtime bluetooth
--runtime cannot be used with unmask

$ systemctl --root=/ --runtime enable bluetooth
Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ enable bluetooth
Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ preset bluetooth
Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /run/systemd/system/dbus-org.bluez.service.
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /etc/systemd/system/dbus-org.bluez.service.
$ systemctl --root=/ preset --runtime bluetooth
--runtime cannot be used with preset

$ systemctl preset-all --runtime
--runtime cannot be used with preset-all
2018-06-01 15:10:33 +02:00
.github github: use multiple issue templates 2018-05-10 07:58:38 -07:00
.mkosi mkosi: ensure the 'hostname' tool is available in the build environment 2018-04-19 11:30:18 +02:00
catalog tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
coccinelle util-lib: introduce new empty_or_root() helper (#8746) 2018-04-18 14:20:49 +02:00
doc doc: fix quoting 2018-05-26 17:02:53 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: consolidate multiple razer evdev sections 2018-05-31 00:59:07 +02:00
man systemctl: when removing enablement or mask symlinks, cover both /run and /etc 2018-06-01 15:10:33 +02:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
po po: update French translation 2018-05-30 08:21:40 +02:00
presets tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
rules udev: create /dev/disk/by-label symlink for LUKS2 (#8998) 2018-05-15 16:51:07 +02:00
shell-completion bash-completion: add completion for portablectl 2018-05-28 18:15:06 +09:00
src systemctl: when removing enablement or mask symlinks, cover both /run and /etc 2018-06-01 15:10:33 +02:00
sysctl.d sysctl.d: request ECN on both in and outgoing connections (#9143) 2018-05-31 13:30:10 +02:00
sysusers.d network: set DynamicUser= to systemd-networkd.service 2018-05-22 22:37:34 +09:00
test Fix pattern to detect distribution 2018-05-30 18:13:14 +02:00
tmpfiles.d add new portable service framework 2018-05-24 17:01:57 +02:00
tools find-double-newline: look in headers too 2018-05-22 16:13:45 +02:00
travis-ci Install ccache in container. 2018-05-22 17:48:14 +03:00
units add new portable service framework 2018-05-24 17:01:57 +02:00
xorg login: avoid external process call 2018-01-12 18:02:57 +01:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes
.gitignore Add mkosi.output/ to .gitignore 2017-11-29 14:33:56 +01:00
.mailmap mailmap: one more person 2018-03-05 17:21:09 +01:00
.travis.yml Enable ccache and mount it into the build/test container. 2018-05-22 17:45:19 +03:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
LICENSE.GPL2
LICENSE.LGPL2.1
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson_options.txt add new portable service framework 2018-05-24 17:01:57 +02:00
meson.build meson: use a convenience static library for nspawn core 2018-05-28 10:40:00 +02:00
mkosi.build mkosi: drop dumping all test output to console again 2018-04-19 11:41:28 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS tree-wide: fix typo in comments and NEWS 2018-05-29 20:18:45 +02:00
README Turn VALGRIND variable into a meson configuration switch 2018-05-17 09:54:36 -07:00
README.md README: mention systemd-stable 2018-03-26 15:28:03 +02:00
TODO doc: update TODO 2018-05-31 17:39:13 +09:00
zanata.xml po: add basic fedora.zanata.org configuration 2018-02-19 13:56:57 +01:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status
CII Best Practices

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.