summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorRoot2007-01-12 21:55:12 +0100
committerRoot2007-01-12 21:55:12 +0100
commit26e06516f8bd3b5c61ff387ccff7ae9cf8900a9f (patch)
tree5b5fd35b4010e696079c07933ba48b729a09ca53 /initramfs/initrd-stuff/init
parentUpdate patch set and config to bb 1.3.1. (diff)
downloadcore-26e06516f8bd3b5c61ff387ccff7ae9cf8900a9f.tar.gz
core-26e06516f8bd3b5c61ff387ccff7ae9cf8900a9f.tar.xz
core-26e06516f8bd3b5c61ff387ccff7ae9cf8900a9f.zip
Quiet output, if in debug=0 ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@622 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init17
1 files changed, 9 insertions, 8 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 446439b8..231e7ea3 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -46,8 +46,8 @@ mkdir -p ${DEVDIR}/.udevdb
[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
-# redirect console (after /dev/console is available, and /dev mounted)
-#exec < /dev/console > /dev/console 2>&1
+# fixme: shut down if script fails
+#trap "exec echo o>/proc/sysrq-trigger" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO
# if no kernel version is set, try to get it directly from /proc
if [ -z $KERNEL ] ; then
@@ -64,9 +64,10 @@ NFSRO="nfs"
# load usb modules for keyboard (reenable usb keyboards, otherwise the
# admin has to wait until second run of hwsetup late in stage3)
+echo "0 0 0 0" >/proc/sys/kernel/printk
( for mod in usbcore uhci-hcd ohci-hcd usbhid; do
modprobe -q $mod 2>/dev/null
-done ) &
+done; echo "1 4 1 7" >/proc/sys/kernel/printk ) &
# run pre init script and user defined preinit.local, copied by mkdxsinitrd
@@ -99,8 +100,6 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
# ... or a specified debug level
debug=*)
DEBUGLEVEL=${opts#debug=}
- # Handle empty, extremly large or non-numeric input
- [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0
[ $DEBUGLEVEL -eq 8 ] && echo "** SLX init started near $(sysup)"
;;
# if configuration should be gathered by dhcp client
@@ -261,6 +260,8 @@ else
# modprobe should stay quiet
MODPRV="-q"
LOGFILE="/dev/null"
+ # redirect console (after /dev/null is available, and /dev mounted)
+ exec < /dev/null > /dev/null 2>&1
fi
# load network adaptor modules
for mod in ${NWMODULES}; do
@@ -583,11 +584,11 @@ umount -n /proc/bus/usb >/dev/null 2>&1
mount -n --move /dev /mnt/dev
chmod a+rwxt /mnt/dev/shm /mnt/tmp /mnt/tmp/scratch 2>/dev/null
-killall -9 udevd 2>/dev/null
-# kill the watchdog (autopoweroff, if stage3 init never finishes)
-[ -f /tmp/watchdogpid ] && kill $(cat /tmp/watchdogpid) 2>/dev/null
+killall -9 udevd 2>/mnt/dev/null
# runtimer
[ $DEBUGLEVEL -eq 8 ] && echo "** SLX init ended near $(sysup)"
+# kill the watchdog (autopoweroff, if stage3 init never finishes)
+[ -f /tmp/watchdogpid ] && kill $(cat /tmp/watchdogpid) 2>/mnt/dev/null
umount -n /proc
# unset old environment variables
unset debug date initrd ip dnbdroot nbdroot nfsroot vci vga