diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 9 | ||||
-rw-r--r-- | scripts/local | 15 | ||||
-rw-r--r-- | scripts/nfs | 11 |
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} +} |