diff options
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/mountall.sh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh index c719be5d9a..2839d57cbe 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh | |||
@@ -19,15 +19,21 @@ | |||
19 | test "$VERBOSE" != no && echo "Mounting local filesystems..." | 19 | test "$VERBOSE" != no && echo "Mounting local filesystems..." |
20 | mount -at nonfs,nosmbfs,noncpfs 2>/dev/null | 20 | mount -at nonfs,nosmbfs,noncpfs 2>/dev/null |
21 | 21 | ||
22 | # | 22 | |
23 | # We might have mounted something over /dev, see if /dev/initctl is there. | 23 | # We might have mounted something over /run; see if |
24 | # | 24 | # /dev/initctl is present. Look for |
25 | if test ! -p /dev/initctl | 25 | # /sbin/init.sysvinit to verify that sysvinit (and |
26 | then | 26 | # not busybox or systemd) is installed as default init). |
27 | rm -f /dev/initctl | 27 | INITCTL="/dev/initctl" |
28 | mknod -m 600 /dev/initctl p | 28 | if [ ! -p "$INITCTL" ] && [ "${INIT_SYSTEM}" = "sysvinit" ]; then |
29 | # Create new control channel | ||
30 | rm -f "$INITCTL" | ||
31 | mknod -m 600 "$INITCTL" p | ||
32 | |||
33 | # Reopen control channel. | ||
34 | PID="$(pidof -s /sbin/init || echo 1)" | ||
35 | [ -n "$PID" ] && kill -s USR1 "$PID" | ||
29 | fi | 36 | fi |
30 | kill -USR1 1 | ||
31 | 37 | ||
32 | # | 38 | # |
33 | # Execute swapon command again, in case we want to swap to | 39 | # Execute swapon command again, in case we want to swap to |