blob: 2839d57cbec5093f1a0fc72736d2a7054385ec74 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: mountall
4# Required-Start: mountvirtfs
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Mount all filesystems.
9# Description:
10### END INIT INFO
11
12. /etc/default/rcS
13
14#
15# Mount local filesystems in /etc/fstab. For some reason, people
16# might want to mount "proc" several times, and mount -v complains
17# about this. So we mount "proc" filesystems without -v.
18#
19test "$VERBOSE" != no && echo "Mounting local filesystems..."
20mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
21
Andrew Geisslerd1e89492021-02-12 15:35:20 -060022
23# We might have mounted something over /run; see if
24# /dev/initctl is present. Look for
25# /sbin/init.sysvinit to verify that sysvinit (and
26# not busybox or systemd) is installed as default init).
27INITCTL="/dev/initctl"
28if [ ! -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"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
38#
39# Execute swapon command again, in case we want to swap to
40# a file on a now mounted filesystem.
41#
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042[ -x /sbin/swapon ] && swapon -a
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043
44: exit 0
45