summaryrefslogtreecommitdiff
path: root/scripts/local
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/local')
-rw-r--r--scripts/local15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/local b/scripts/local
new file mode 100644
index 0000000..572f185
--- /dev/null
+++ b/scripts/local
@@ -0,0 +1,15 @@
+# Local filesystem mounting
+
+# Parameter: Where to mount the filesystem
+mountroot ()
+{
+ # Get the root filesystem type
+ if [ ! -e ${ROOT} ]; then
+ panic "ALERT! ${ROOT} does not exist. Dropping to a shell!"
+ fi
+
+ eval $(fstype < ${ROOT})
+
+ # Mount root
+ mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt}
+}