summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-01-30 19:27:46 +0100
committerDirk von Suchodoletz2007-01-30 19:27:46 +0100
commit7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5 (patch)
treeeb6294af90a1b78e51bc75c96c0e0274b7b8225b /initramfs/initrd-stuff/init
parentgeneral kdm config now in /etc/functions (diff)
downloadcore-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.tar.gz
core-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.tar.xz
core-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.zip
Debugging output for level 20, 21, (22) ... see DebugLevel ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@659 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init48
1 files changed, 37 insertions, 11 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index eac22b2b..419ad956 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -104,7 +104,8 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
# ... or a specified debug level
debug=*)
DEBUGLEVEL=${opts#debug=}
- [ $DEBUGLEVEL -eq 8 ] && echo "** SLX init started near $(sysup)"
+ [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
+ echo "** SLX init started near $(sysup)"
;;
# if configuration should be gathered by dhcp client
dhcp)
@@ -244,7 +245,11 @@ fi
# server
[ -z "$DHCP" -a -n "$LDAP" -a -z "$IPINFO" ] && error "$init_errldap"
# set debug level and logfile
-echo "Setting debuglevel to ${DEBUGLEVEL}"
+if [ $DEBUGLEVEL -eq 20 ] ; then
+ echo "** Setting debuglevel to ${DEBUGLEVEL} at $(sysup)"
+else
+ echo "Setting debuglevel to ${DEBUGLEVEL}"
+fi
export MODPRV=" "
export LOGFILE
if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then
@@ -253,11 +258,11 @@ if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then
LOGFILE="/var/log/dxs-boot.log"
echo "1 4 1 7" >/proc/sys/kernel/printk
[ "${DEBUGLEVEL}" -ge 2 ] && MODPRV="-v"
- [ "${DEBUGLEVEL}" -gt 3 ] && {
+ [ "${DEBUGLEVEL}" -gt 3 -a "${DEBUGLEVEL}" -le 8 ] && {
set -x
# and the kernel too
echo "7 7 7 7" >/proc/sys/kernel/printk; }
- [ "${DEBUGLEVEL}" -gt 10 ] && set +x
+ [ "${DEBUGLEVEL}" -gt 10 -a "${DEBUGLEVEL}" -le 20 ] && set +x
else
# switch off most of kernel debug output
echo "0 0 0 0" >/proc/sys/kernel/printk
@@ -268,11 +273,14 @@ else
[ "${DEBUGLEVEL}" != 8 ] && exec < /dev/null > /dev/null 2>&1
fi
# load network adaptor modules
+[ $DEBUGLEVEL -eq 20 ] && \
+ echo "** loading all defined network adaptor modules at $(sysup)"
for mod in ${NWMODULES}; do
modprobe ${MODPRV} $mod || error "$init_errnwad"
done
# set up loopback networking (ipsetup - function defined in /etc/functions)
+[ $DEBUGLEVEL -eq 20 ] && echo "** starting ip config at $(sysup)"
ipsetup 127.0.0.1 255.0.0.0 0.0.0.0 127.255.255.255 lo
# Xen bridge config
@@ -310,6 +318,7 @@ if [ -n "$noipyet" ] ; then
-o -z "$broadcast_address" ] && error "$init_errdhcp"
ipsetup $clientip $subnet_mask $gateway $broadcast_address eth0
fi
+[ $DEBUGLEVEL -eq 20 ] && echo "** finished ip config at $(sysup)"
# ... or ldap if available (in background)
[ -n "$LDAP" ] && ldapconf &
# ... or via tftp file get (in background)
@@ -322,7 +331,11 @@ if [ -n "${nbdmod}" ] ; then
[ -x /bin/mdev ] && mdev -s
[ -z "$nbdrfst" ] && nbdrfst=ext2
nbdhost=$(checkip $nbdhost)
- echo "Diskless client using ${nbdmod} on $nbdhost:$nbdport with $nbdrfst"
+ if [ $DEBUGLEVEL -eq 20 ] ; then
+ echo "** starting setup of ${nbdmod} at $(sysup)"
+ else
+ echo "Diskless client using ${nbdmod} on $nbdhost:$nbdport with $nbdrfst"
+ fi
# fixme: check for fs in /proc/filesystems before trying to load the module
modprobe ${MODPRV} ${nbdrfst} || error "$init_errnbd" nonfatal
@@ -388,8 +401,9 @@ if [ -n "${nbdmod}" ] ; then
usleep $i
mount -n -t $nbdrfst -o $RWRO $RDEV /mnt 2>/dev/null && break
done
+ [ $DEBUGLEVEL -eq 20 ] && echo "** finished nw blockdev stuff at $(sysup)"
elif [ -n ${iscsiserver} ] ; then
- :
+ [ $DEBUGLEVEL -eq 20 ] && echo "** started setting up iSCSI initiator"
#if [ -n ${iscsitarget} ] ; then
# echo "InitiatorName=${iscsitarget}"|sed "s,@@@serverip@@@,$serverip," \
# >/etc/initiatorname.iscsi
@@ -403,25 +417,33 @@ elif [ -n ${iscsiserver} ] ; then
fi
# if no type of root filesystem is passed via kernel command line try
-# information gathered from dhcp process
+# information gathered from dhcp process (only valid for nfs)
if [ -z "${nbdmod}" -a -z "${nbdhost}" -a -z "${nfsroot}" ] ; then
# information has to be read from dhcp and ldap configuration
cfgcomplete
fi
# call function for nfs mounts
if [ -z "${nbdmod}" -a -z "${nbdserver}" ] ; then
+ [ $DEBUGLEVEL -eq 20 ] && echo "** started nfs mount"
. /etc/machine-setup
# check if nfsserver is set as variable @@@serverip@@@
nfsserver=$(checkip $nfsserver)
nfsroot=${nfsserver}:${root_path}
nfsmnt ${nfsroot} || error "$init_nfs"
+ [ $DEBUGLEVEL -eq 20 ] && echo "** finished nfs mount"
fi
# get the complete collection of kernel modules available
mount -n --bind /mnt/lib/modules/${KERNEL} /lib/modules/${KERNEL} || \
error "$init_moddir"
-# start hardware configuration as background process
-hwautocfg &
+# start hardware configuration as background process if not a special
+# debuglevel (21) is used for the option of manual hwautocfg start
+if [ ${DEBUGLEVEL} = 21 ] ; then
+ /bin/sh
+else
+ [ $DEBUGLEVEL -eq 20 ] && echo "** started hwautocfg in background"
+ hwautocfg &
+fi
# try to use unionfs for rw access if available
if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then
@@ -520,8 +542,12 @@ for linux diskless client specific debugging output\nLOGFILE=\"$LOGFILE\"\n#\
# run distribution independent and dependent configuration of files and
# services
-servconfig &
-
+if [ ${DEBUGLEVEL} = 22 ] ; then
+ /bin/sh
+else
+ servconfig &
+fi
+
for path in @@@COMDIRINDXS@@@ ${D_DIRINDXS} ${D_DIRINBINDMNT} ; do
testmkd /mnt/${path}
done