[CentOS] CentOS 7 and systemd: SysV initscript: how detect boot vs. interactive use?

James Hogarth
Sun, 18 Dec 2016 18:22:24 -0000

On 18 Dec 2016 10:59, "whitivery" <co55-sy1t at dea.spamcon.org>
wrote:

Moving from CentOS 5 to CentOS 7, discovered that a test in a SysV
initscript for whether it is running interactively, instead of at boot
time, no longer works.

Under CentOS 7 / systemd, is there some way for the initscript to know
this?


Generally "interactive" init scripts are not in any way supported
under any
RHEL version and can't be done under systemd on EL7

What is it that it does and you are actually trying to achieve?

If it's a password or something like that it's possible to integrate
with
the systemd-ask-password facility from a unit file, but it is quite complex
relatively speaking so it'd be useful to know the actual goal in mind
before going down this road.