1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00

units: refuse manual operations on factory-reset-now.target and friends

It is strictly mandatory that this is done during initial
transaction, and not later when the system is already running.
Hence let's refuse manual start for all of the involved units.
Additionally, refuse manual stop for systemd-factory-reset-complete.service,
as it flags the factory reset completion through
/run/systemd/factory-reset-complete, which never gets removed
for the whole boot.
This commit is contained in:
Mike Yuan
2025-03-05 15:54:26 +01:00
parent 54cd851bd9
commit 651b44bdda
2 changed files with 3 additions and 0 deletions

View File

@@ -11,3 +11,4 @@
Description=Factory Reset Execution
Documentation=man:systemd.special(7)
Wants=systemd-factory-reset-complete.service
RefuseManualStart=yes

View File

@@ -15,6 +15,8 @@ Requires=factory-reset-now.target
After=factory-reset-now.target
Conflicts=shutdown.target
Before=shutdown.target
RefuseManualStart=yes
RefuseManualStop=yes
[Service]
Type=oneshot