summaryrefslogtreecommitdiff
path: root/scripts
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
Initial checkin
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions9
-rw-r--r--scripts/local15
-rw-r--r--scripts/nfs11
3 files changed, 35 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions
new file mode 100644
index 0000000..19560ba
--- /dev/null
+++ b/scripts/functions
@@ -0,0 +1,9 @@
+panic()
+{
+ echo $@
+ if [ -e /bin/busybox ]; then
+ FS1='(initramfs) ' exec /bin/busybox sh
+ else
+ FS1='(initramfs) ' exec /bin/sh
+ fi
+}
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}
+}
diff --git a/scripts/nfs b/scripts/nfs
new file mode 100644
index 0000000..1225c4d
--- /dev/null
+++ b/scripts/nfs
@@ -0,0 +1,11 @@
+
+# Paramter: Where the root should be mounted
+mountroot ()
+{
+ ipconfig ${DEVICE}
+ . /tmp/net-${DEVICE}.conf
+ if [ "x${NFSROOT}" = "xauto" ]; then
+ NFSROOT=${ROOTSERVER}:${ROOTPATH}
+ fi
+ nfsmount ${NFSROOT} ${rootmnt}
+}