summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r--initrd/initrd-stuff/etc/functions24
1 files changed, 17 insertions, 7 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 006ccb17..4ad7fe5c 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -2,7 +2,7 @@
# (included by init, hwautocfg, servconfig, ... within OpenSLX initial
# ramfs)
#
-# Dirk von Suchodoletz <dvs@OpenSLX.com>, 31-08-2006
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 03-09-2006
# Felix Endres, 30-04-2006
# Tobias Maier
#
@@ -72,10 +72,11 @@ else LOGFILE="/dev/null"
fi
# if nonfatal error else fatal error message and shell
if [ -n "$2" ] ; then
- [ "$DEBUGLEVEL" -ge 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}" \
- >> ${LOGFILE}
- [ "$DEBUGLEVEL" -gt 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}"
- [ "$DEBUGLEVEL" -gt 2 ] && usleep 20
+ [ "$DEBUGLEVEL" -ge 1 -a "$DEBUGLEVEL" != 8 ] && \
+ echo -e "${error_msg}${e_msg}${error_nfe}" >> ${LOGFILE}
+ [ "$DEBUGLEVEL" -gt 1 -a "$DEBUGLEVEL" != 8 ] && \
+ echo -e "${error_msg}${e_msg}${error_nfe}"
+ [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && usleep 20
else
echo -e "${error_msg}${e_msg}${error_shell}"
# load usb modules to have keyboard enabled - they might have to be
@@ -91,6 +92,14 @@ else
# }
fi
}
+#######################################################################
+# system uptime for performance analysis
+sysup () {
+uptime=$(sed -e "s, .*,,;s,\.,," /proc/uptime)
+echo "${uptime} ms."
+# if start times are kept, a summary of runtimes would be possible too
+}
+
#######################################################################
# micro sleep - either busybox command or simply loop and delete 1 from
@@ -322,7 +331,8 @@ case $dhcp in
error "$error_pump"
;;
ipconfig)
- [ $DEBUGLEVEL -gt 1 ] && echo -e "# You are using ipconfig as dhcp \
+ [ $DEBUGLEVEL -gt 1 -a "$DEBUGLEVEL" != 8 ] && \
+echo -e "# You are using ipconfig as dhcp \
client. With this tool you only get the\n# basic IP settings from the \
server. No vendor specific, self defined\n# dhcp options are possible this \
way. use dhclient instead or get them via\n# tftp (to be enabled via kernel \
@@ -370,7 +380,7 @@ esac
# unpack part (only gzip is supported)
if [ -s $dst ] ; then
tar -xpzf $dst 2>/dev/null
- [ "$DEBUGLEVEL" -le 2 ] && rm $dst
+ [ "$DEBUGLEVEL" -le 2 -o "$DEBUGLEVEL" -eq 8 ] && rm $dst
return 0
else
return 1