summaryrefslogtreecommitdiff
path: root/scripts/local
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@ubuntu.com>2005-06-08 21:13:41 +0000
committerJeff Bailey <jbailey@ubuntu.com>2005-06-08 21:13:41 +0000
commitde9c780f57ae626f05ec1c971c56648250cba03c (patch)
tree585d8515ef623e64b2800cc4266920fff1564940 /scripts/local
downloadinitramfs-tools-de9c780f57ae626f05ec1c971c56648250cba03c.tar.gz
initramfs-tools-de9c780f57ae626f05ec1c971c56648250cba03c.zip
Initial checkin
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}
+}