Add tests for C++ compiler
[hvlinux.git] / stage1 / bootscripts / mountkernfs
index 9c3fed5..e581e5d 100755 (executable)
@@ -1,25 +1,36 @@
-#!/bin/sh
+#!/bin/bash
 
 # mountkernfs
 
 # Source functions library
 source /etc/rc.d/init.d/functions
 
+mount_kernel_virtual_fs()
+{
+    # 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).
+    echo "Mounting /proc"
+    mount -n /proc
+
+    echo "Mounting /sys"
+    mount /sys
+
+    echo "Mounting /tmp"
+    mount /tmp
+
+    echo "Mounting /run"
+    mount /run
+}
+
 case "$1" in
     start)
-       # 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 file system" mount -n proc
-       cmd_run_log_box "Mounting /sys file system" mount sys
+       # /dev is automatically mounted by the kernel
+       cmd_run_log_box "Mounting kernel virtual filesystems" mount_kernel_virtual_fs
        ;;
 
-    stop)
-       umount -n proc
-        ;;
-
     *)
-        echo "Usage: $0 {start|stop}"
+        echo "Usage: $0 {start}"
         exit ${EXIT_CODE_FAILURE}
        ;;
 esac