Discussion:
Service to pause startup and wait for user input
Add Reply
Boyce, Kevin P [US] (AS)
2018-01-25 17:24:28 UTC
Reply
Permalink
Raw Message
Good Afternoon List,

Does anyone know if there is a way to create a service unit that pauses early on in the boot sequence and asks the user a question?
A reply would be required via keyboard.

Thanks,
Kevin
Mantas Mikulėnas
2018-01-25 17:40:38 UTC
Reply
Permalink
Raw Message
On Thu, Jan 25, 2018 at 7:24 PM, Boyce, Kevin P [US] (AS) <
Post by Boyce, Kevin P [US] (AS)
Good Afternoon List,
Does anyone know if there is a way to create a service unit that pauses
early on in the boot sequence and asks the user a question?
A reply would be required via keyboard.
Use systemd-firstboot.service as an example. It has DefaultDependencies=no
and orders itself before sysinit.target and some early-boot services.

See also the diagram in the bootup(7) manpage.
--
Mantas Mikulėnas
Uoti Urpala
2018-01-25 17:43:59 UTC
Reply
Permalink
Raw Message
Post by Boyce, Kevin P [US] (AS)
Does anyone know if there is a way to create a service unit that
pauses early on in the boot sequence and asks the user a question?
A reply would be required via keyboard.
There is no separate "pause" feature. You can likely implement the
wanted functionality with explicit dependencies - create a unit which
is only considered "started" when the question has been answered, and
make whatever other units you want to start only after that depend on
the new unit.
Tomasz Torcz 👁️
2018-01-25 20:02:17 UTC
Reply
Permalink
Raw Message
Post by Boyce, Kevin P [US] (AS)
Good Afternoon List,
Does anyone know if there is a way to create a service unit that pauses early on in the boot sequence and asks the user a question?
A reply would be required via keyboard.
This is an antipattern, but I guess you can hask around password
asking mechanism,
https://www.freedesktop.org/software/systemd/man/systemd-ask-password.html
--
Tomasz Torcz Only gods can safely risk perfection,
xmpp: ***@chrome.pl it's a dangerous thing for a man. -- Alia
Loading...