mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
This is very similar to 327cd2d3db:
If emergency.target is started while initrd-cleanup.service/start is queued,
the initrd-cleanup job did not get canceled. In parallel to the emergency
units, it eventually runs the service, which in turn isolates and starts
initrd-switch-root.target. This stops the emergency units and effectively
starts the initrd boot process again, which likely fails again like the
initial attempt. The system is thus stuck in a loop, never really reaching
emergency.target.
This can be triggered if a service in between initrd-parse-etc.service
and initrd.target fails.
With this conflict added, starting emergency.target automatically cancels
initrd-cleanup.service/start, avoiding the loop.
22 lines
697 B
Desktop File
22 lines
697 B
Desktop File
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Cleaning Up and Shutting Down Daemons
|
|
DefaultDependencies=no
|
|
AssertPathExists=/etc/initrd-release
|
|
OnFailure=emergency.target
|
|
OnFailureJobMode=replace-irreversibly
|
|
After=initrd-root-fs.target initrd-fs.target initrd.target
|
|
Conflicts=emergency.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=systemctl --no-block isolate initrd-switch-root.target
|