summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions39
-rw-r--r--scripts/local8
-rw-r--r--scripts/nfs10
3 files changed, 54 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions
index 5fb8c04..1899a14 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1,9 +1,45 @@
# -*- shell-script -*-
+_log_msg()
+{
+ if [ "$quiet" = "y" ]; then return; fi
+ echo "$@"
+}
+
+log_success_msg()
+{
+ _log_msg "Success: $@"
+}
+
+log_failure_msg()
+{
+ _log_msg "Failure: $@"
+}
+
+log_warning_msg()
+{
+ _log_msg "Warning: $@"
+}
+
+log_begin_msg()
+{
+ _log_msg "Begin: $@ ..."
+}
+
+log_end_msg()
+{
+ _log_msg "Done."
+}
+
+# update_progress() # ToDo: NOP placeholder... what else for usplash?
+# {
+# :
+# }
+
panic()
{
echo $@
- FS1='(initramfs) ' exec /bin/sh
+ FS1='(initramfs) ' exec /bin/sh </dev/console >/dev/console 2>&1
}
render()
@@ -162,5 +198,4 @@ load_modules()
done
ide_boot_events
-
}
diff --git a/scripts/local b/scripts/local
index 4a17abb..bcc96ad 100644
--- a/scripts/local
+++ b/scripts/local
@@ -3,7 +3,9 @@
# Parameter: Where to mount the filesystem
mountroot ()
{
+ log_begin_msg "Running /scripts/local-top"
run_scripts /scripts/local-top
+ log_end_msg
# Get the root filesystem type
if [ ! -e ${ROOT} ]; then
@@ -12,7 +14,9 @@ mountroot ()
eval $(fstype < ${ROOT})
+ log_begin_msg "Running /scripts/local-premount"
run_scripts /scripts/local-premount
+ log_end_msg
if [ ${readonly} = y ]; then
roflag=-r
@@ -20,10 +24,14 @@ mountroot ()
roflag=-w
fi
+ # FIXME This has no error checking
modprobe ${FSTYPE}
+ # FIXME This has no error checking
# Mount root
mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt}
+ log_begin_msg "Running /scripts/log-bottom"
run_scripts /scripts/local-bottom
+ log_end_msg
}
diff --git a/scripts/nfs b/scripts/nfs
index 1e2be2c..8149e86 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -1,9 +1,13 @@
-# NFS filesystem mounting *- shell-script -*-
+# NFS filesystem mounting -*- shell-script -*-
+
+# FIXME This needs error checking
# Paramter: Where the root should be mounted
mountroot ()
{
+ log_begin_msg "Running /scripts/nfs-top"
run_scripts /scripts/nfs-top
+ log_end_msg
modprobe nfs
# For DHCP
@@ -15,7 +19,9 @@ mountroot ()
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
+ log_begin_msg "Running /scripts/nfs-premount"
run_scripts /scripts/nfs-premount
+ log_end_msg
if [ ${readonly} = y ]; then
roflag="-o ro"
@@ -25,6 +31,8 @@ mountroot ()
nfsmount ${roflag} ${NFSROOT} ${rootmnt}
+ log_begin_msg "Running /scripts/nfs-bottom"
run_scripts /scripts/nfs-bottom
+ log_end_msg
}