blob: 0a52c90dacd0a816a3b703d0eb9e840cca720ded [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: mountvirtfs
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Mount kernel virtual file systems.
9# Description: Mount initial set of virtual filesystems the kernel
10# provides and that are required by everything.
11### END INIT INFO
12
13if [ -e /proc ] && ! [ -e /proc/mounts ]; then
14 mount -t proc proc /proc
15fi
16
17if [ -e /sys ] && grep -q sysfs /proc/filesystems && ! [ -e /sys/class ]; then
18 mount -t sysfs sysfs /sys
19fi
20
21if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then
22 mount -t debugfs debugfs /sys/kernel/debug
23fi
Patrick Williamsf1e5d692016-03-30 15:21:19 -050024
25if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then
26 mount -n -t devtmpfs devtmpfs /dev
27fi