1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
The systemd System and Service Manager
Go to file
Alan Jenkins f1e24a259c units: don't kill the emergency shell when sysinit.target is triggered (#6765)
Why
---

The advantage of this is that starting sysinit.target from the emergency
shell will no longer kill the emergency shell and lock you out of the
system.  Our docs already claimed that emergency.target was useful for
"starting individual units in order to continue the boot process in steps".
This resolves #6509 for my purposes.

Remaining limitation
--------------------

Starting getty.target will still kill the shell, and if you don't have a
root password you will then be locked out at that point.  This is relevant
to distributions which patch the sulogin system to permit logins when the
root password is locked.  Both Debian and RedHat used to follow this
behaviour!  Debian have been discussing what they could replace it with at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806852

So this doesn't quite achieve perfection, but I think it's a worthwhile
change.  It should be easier to understand the logic now it doesn't have
such a big hole in it.  Repairing the sysinit stage of the boot is the main
reason we have emergency.target.  And as discussed in the issue,
sysinit.target gets pulled in implicitly as soon as any DefaultDependencies
service is activated.

How
---

sysinit.target only needs to conflict with emergency.target.  It didn't
need to conflict with emergency.service as well.  In theory the conflicts
are pointless, we could just change the dependency of sysinit.target on
local-fs.target from Wants to Requires.  However, doing so would mean that
when local-fs fails, the screen is flooded with yellow [DEPEND] failures.
That would hinder the poor unfortunate admin, so let's not do that.

There is no additional ordering requirement against emergency.  If the
failure happens, the job for sysinit will be cancelled instantly.  We don't
need to worry about when sysinit.target and its dependents would be
stopped, because sysinit waits for local-fs before it starts.

emergency.target is still necessarily stopped once we reach sysinit
(you can't express a one-way conflict in pure unit directives).
This is largely cosmetic... though perhaps it symbolizes that you're no
longer in Emergency Mode if System Initialization is successful ;-).

As a secondary advantage, the getty's which conflict on rescue.service now
need to conflict on emergency.service as well.  This makes the system more
uniform and simpler to understand.

The only other effect this should have is that
`systemctl start emergency.target` is now practically the same as
`systemctl start rescue.target`.  The only units this command will stop are
the conflicting getty units.  Neither of those commands should ever be
used.  E.g. they will not stop the gdm.service unit on Fedora 26.
2017-09-14 21:43:43 +02:00
.github CONTRIBUTING: stop mentioning "make check" 2017-08-21 09:47:07 +02:00
.mkosi mkosi.arch: fix comment (#6470) 2017-07-28 09:24:12 +02:00
catalog build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
coccinelle tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
docs build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: add Lenovo Yoga 510-14IKB sensor mount quirk (#6799) 2017-09-12 18:39:25 +02:00
man Merge pull request #6801 from johnlinp/master 2017-09-14 21:41:13 +02:00
modprobe.d modprobe.d: ship drop-in to set bonding max_bonds to 0 (#6448) 2017-08-02 08:41:18 -04:00
network build-sys: drop automake support 2017-07-18 10:04:44 -04:00
po Added Romanian Translation (#6674) 2017-08-28 18:24:09 +02:00
rules rules: ubi mtd - add link to named partitions (#6750) 2017-09-14 14:53:07 +02:00
shell-completion analyze: add get-log-level, get-log-target verbs 2017-09-07 23:55:59 +02:00
src Merge pull request #6826 from poettering/empty-list-conf 2017-09-14 20:14:37 +02:00
sysctl.d build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
system-preset build-sys: drop automake support 2017-07-18 10:04:44 -04:00
sysusers.d units,sysusers: use DynamicUser= for journal-gatewayd and drop user systemd-journal-gateway from sysusers 2017-07-28 13:37:10 +09:00
test test: add test case for UnsetEnvironment= 2017-09-14 15:17:40 +02:00
tmpfiles.d tmpfiles.d/journal-nocow: fix typo (#6804) 2017-09-12 13:28:21 -03:00
tools meson: install the git hook (#6425) 2017-07-24 10:41:45 +02:00
units units: don't kill the emergency shell when sysinit.target is triggered (#6765) 2017-09-14 21:43:43 +02:00
xorg login: support user-bus on dbus1 2015-08-31 18:12:37 +02: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 git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore build-sys: drop gitignore patterns for in-tree builds 2017-07-18 10:05:06 -04:00
.mailmap mailmap: add entry 2017-07-18 10:04:44 -04:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
CODING_STYLE tree-wide: set SA_RESTART for signal handlers we install 2016-12-01 12:41:17 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
DISTRO_PORTING DISTRO_PORTING: document that distros may/should change fallback DNS as well as fallback NTP if they wish 2017-07-24 11:49:16 +02:00
ENVIRONMENT.md Rename $TEST_DIR to $SYSTEMD_TEST_DATA, document it 2017-02-16 21:36:31 +01:00
HACKING HACKING: update for meson 2017-07-18 10:05:06 -04:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson_options.txt Merge pull request #6420 from keszybz/gateway-name 2017-08-01 09:43:41 +02:00
meson.build build-sys: make nonnull warning non-fatal (#6742) 2017-09-04 18:49:12 +02:00
mkosi.build mkosi: use '[' rather than 'test' everywhere 2017-07-20 14:37:05 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS analyze: add get-log-level, get-log-target verbs 2017-09-07 23:55:59 +02:00
README README: note that installing valgrind-devel maybe useful to developers (#6502) 2017-08-30 13:07:43 +02:00
README.md README: include small graphs of open issues and pull requests (#5576) 2017-03-13 08:10:04 +01:00
TODO units: set LockPersonality= for all our long-running services (#6819) 2017-09-14 19:45:40 +02:00

systemd - System and Service Manager

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

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.