Please find the Sys V Init scripts for (User processes)Agent and Security daemon in Linux.
Agent Daemon startup script /etc/rc.d/init.d/Agentdaemon /etc/rc.d/rc5.d/S91Agentdaemon
Security Daemon startup script /etc/rc.d/init.d/Securitydaemon /etc/rc.d/rc5.d/S91Securitydaemon
Let us assume both agent and securiy daemons need a common parent say common agent. If common agent is not started at the time of reboot, any of the other daemons will start common agent and the other daemon will skip to start the common agent. There is 'ps' command check to see if common agent is running or not to skip creation in both the Agentdaemon and Securitydaemon scripts. This has worked fine in RHEL 6.2. But in RHEL 7, I am seeing two common agents are running.
And also I doubt that systemd has started both agent and security daemon parallely. Somehow 'ps' has not shown the common agent running.
Ex: ps -ef | grep common | grep -v grep | awk '{print $2}' is not showing the common process started by other script and hence the other script also starts the common agent.
Is there any way I can avoid the startup scripts run in parrallel or Should I migrate the scripts to systemd format? Quick workaround is more interested than migrating all the scripts from Sys V init type to systemd.
systemd
by disabling their unit files and use the old approach to start the daemons. – Thushi Jun 02 '15 at 11:42rc
scripts); and the questioner has asked about using systemd unit files instead. – JdeBP Jun 02 '15 at 15:48