mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
initscripts: Use initctl on sysvinit only
Check if init system is sysvinit to recreate initctl, this ensures that it can be used with busybox init system as well (From OE-Core rev: 15c467d0206ee30fe708f76b7d5e0033ab687475) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -19,15 +19,21 @@
|
||||
test "$VERBOSE" != no && echo "Mounting local filesystems..."
|
||||
mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
|
||||
|
||||
#
|
||||
# We might have mounted something over /dev, see if /dev/initctl is there.
|
||||
#
|
||||
if test ! -p /dev/initctl
|
||||
then
|
||||
rm -f /dev/initctl
|
||||
mknod -m 600 /dev/initctl p
|
||||
|
||||
# We might have mounted something over /run; see if
|
||||
# /dev/initctl is present. Look for
|
||||
# /sbin/init.sysvinit to verify that sysvinit (and
|
||||
# not busybox or systemd) is installed as default init).
|
||||
INITCTL="/dev/initctl"
|
||||
if [ ! -p "$INITCTL" ] && [ "${INIT_SYSTEM}" = "sysvinit" ]; then
|
||||
# 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
|
||||
|
||||
#
|
||||
# Execute swapon command again, in case we want to swap to
|
||||
|
||||
Reference in New Issue
Block a user