Simplify mountkernfs bootscript output
authorHugo Villeneuve <hugo@hugovil.com>
Sun, 1 Sep 2013 23:27:12 +0000 (19:27 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 31 Jul 2014 02:15:24 +0000 (22:15 -0400)
stage1/bootscripts/mountkernfs

index 263e4ff..e581e5d 100755 (executable)
@@ -5,17 +5,28 @@
 # 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)
        # /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 /tmp" mount /tmp
-       cmd_run_log_box "Mounting /run" mount /run
+       cmd_run_log_box "Mounting kernel virtual filesystems" mount_kernel_virtual_fs
        ;;
 
     *)