Merge stage1 x86_64 dans trunk
[hvlinux.git] / stage1 / bootscripts / mountkernfs
diff --git a/stage1/bootscripts/mountkernfs b/stage1/bootscripts/mountkernfs
new file mode 100755 (executable)
index 0000000..9c3fed5
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# mountkernfs
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+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
+       ;;
+
+    stop)
+       umount -n proc
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop}"
+        exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?