-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a systemd service that enables Initial Setup if /.unconfigured ex…
…ists (#1257624) Add a systemd service called initial-setup-reconfiguration.service that automatically starts initial-setup.service when a file named .unconfigured exists in filesystem root (/). Initial Setup will then detect the file & start in the reconfiguration mode. Initial Setup also makes sure to delete the file & disable its service once done. Resolves: rhbz#1257624
- Loading branch information
Showing
5 changed files
with
71 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
echo "The /.unconfigured file has been detected, enabling Initial Setup in reconfiguration mode." | systemd-cat -t initial-setup -p 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[Unit] | ||
Description=Initial Setup reconfiguration mode trigger service | ||
After=livesys.service plymouth-quit-wait.service | ||
After=systemd-vconsole-setup.service | ||
Before=display-manager.service getty@tty1.service getty@ttyUSB0.service | ||
Before=serial-getty@ttyS0.service serial-getty@ttyO0.service serial-getty@ttyO2.service | ||
Before=serial-getty@ttyAMA0.service serial-getty@ttymxc0.service serial-getty@ttymxc3.service serial-getty@hvc0.service | ||
Before=initial-setup.service | ||
Conflicts=plymouth-quit-wait.service | ||
ConditionKernelCommandLine=!rd.live.image | ||
ConditionPathExists=/.unconfigured | ||
Requires=initial-setup.service | ||
|
||
[Service] | ||
Type=oneshot | ||
TimeoutSec=0 | ||
StandardInput=tty | ||
StandardOutput=tty | ||
RemainAfterExit=yes | ||
ExecStart=/usr/libexec/initial-setup/reconfiguration-mode-enabled | ||
TimeoutSec=0 | ||
RemainAfterExit=no | ||
|
||
[Install] | ||
WantedBy=graphical.target | ||
WantedBy=multi-user.target |