On Fri, Dec 18, 2020 at 10:29 AM Sinan Kaya <okaya@kernel.org> wrote:
On 12/17/2020 5:54 PM, Khem Raj wrote:
> +if [ ! -p "$INITCTL" ] && [ "$(readlink -- "/sbin/init")" = "/sbin/init.sysvinit" ]; then

Can this be done at build time for targets using sysvinit only?

Yes however It will be lot more obscure 
Hard to read and harder to maintain 

> +    # Create new control channel
> +             rm -f "$INITCTL"
> +             mknod -m 600 "$INITCTL" p
> +
> +             # Reopen control channel.
> +             PID="$(pidof -s /sbin/init || echo 1)"
> +             [ -n "$PID" ] && kill -s USR1 "$PID"
>  fi
> -kill -USR1 1