#!/bin/bash # mountkernfs # Source functions library source /etc/rc.d/init.d/functions case "$1" in start) # /dev is automatically mounted by the kernel # The "-n: option tells mount not to write to the /etc/mtab # file (because /etc/mtab is a symbolic link to /proc/mounts, # which we are in the process of mounting). cmd_run_log_box "Mounting /proc" mount -n /proc cmd_run_log_box "Mounting /sys" mount /sys cmd_run_log_box "Mounting /run" mount /run ;; stop) umount -n proc ;; *) echo "Usage: $0 {start|stop}" exit ${EXIT_CODE_FAILURE} ;; esac exit $?