summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-09-03 15:59:27 +0200
committerDirk von Suchodoletz2006-09-03 15:59:27 +0200
commit42afca10fa4df79e7dfd7ddfe4df21df82ac159c (patch)
tree325bcad9dcccee0faea4ca88cf135e9c6a2ec07b /initrd/initrd-stuff/etc/functions
parentMore cleanups in servconfig ... (diff)
downloadcore-42afca10fa4df79e7dfd7ddfe4df21df82ac159c.tar.gz
core-42afca10fa4df79e7dfd7ddfe4df21df82ac159c.tar.xz
core-42afca10fa4df79e7dfd7ddfe4df21df82ac159c.zip
VMware environment: loopfile and mount will be placed in /etc/vmware
now to avoid problems with nfs and unionfs. Cleanups in vmware-prep script. Introduced new debug level for script runtime calculation, see DebugLevel for further information. Code cleanups in major initramfs scripts, improved /tmp handling in hwautocfg and init ... Removed imgsrv variable (from machine-setup), just merged with the vmware variable (put the vmware image source here ...) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@352 95ad53e4-c205-0410-b2fa-d234c58c8868
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