Skip to content
Commit 0e2e7e82 authored by Franck Bui's avatar Franck Bui Committed by Zbigniew Jędrzejewski-Szmek
Browse files

core: make sure initrd-switch-root command survives PID1's killing spree (#4730)

This is a different way to implement the fix proposed by commit
a4021390 suggested by Lennart Poettering.

In this patch we instruct PID1 to not kill "systemctl switch-root" command
started by initrd-switch-root service using the "argv[0][0]='@'" trick.

See: https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/ for
more details.

We had to backup argv[0] because argv is modified by dispatch_verb().
(cherry picked from commit acc28e2e)
parent 40961286
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment