Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/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 | |
| 13 | if [ -e /proc ] && ! [ -e /proc/mounts ]; then |
| 14 | mount -t proc proc /proc |
| 15 | fi |
| 16 | |
| 17 | if [ -e /sys ] && grep -q sysfs /proc/filesystems && ! [ -e /sys/class ]; then |
| 18 | mount -t sysfs sysfs /sys |
| 19 | fi |
| 20 | |
| 21 | if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then |
| 22 | mount -t debugfs debugfs /sys/kernel/debug |
| 23 | fi |