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:
@@ -11,3 +11,4 @@
|
||||
Description=Factory Reset Execution
|
||||
Documentation=man:systemd.special(7)
|
||||
Wants=systemd-factory-reset-complete.service
|
||||
RefuseManualStart=yes
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user