xref: /openbmc/openbmc/meta-security/meta-hardening/recipes-core/initscripts/files/mountall.sh (revision cc58928593c3952679181b6bf8e4113080ffa867)
1#!/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..."
20mkdir -p /home
21mkdir -p /var
22mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
23
24#
25# We might have mounted something over /dev, see if /dev/initctl is there.
26#
27if test ! -p /dev/initctl
28then
29	rm -f /dev/initctl
30	mknod -m 600 /dev/initctl p
31fi
32kill -USR1 1
33
34#
35# Execute swapon command again, in case we want to swap to
36# a file on a now mounted filesystem.
37#
38[ -x /sbin/swapon ] && swapon -a
39
40: exit 0
41
42