summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-12-22 20:01:19 +0100
committerDirk von Suchodoletz2008-12-22 20:01:19 +0100
commit6ad0e3615becb019cbcd38595fc0a97e69d72cf5 (patch)
treef23e2c62fe073bf013945df644553edf3a00113a
parentStub files (not really matched yet) for new distributions ... (diff)
downloadcore-6ad0e3615becb019cbcd38595fc0a97e69d72cf5.tar.gz
core-6ad0e3615becb019cbcd38595fc0a97e69d72cf5.tar.xz
core-6ad0e3615becb019cbcd38595fc0a97e69d72cf5.zip
Ping to the nfs server added to init: Before the NFS root is mounted an
ICMP package is sent (waiting for max. of 15 seconds). This might help to get a proper TCP NFS mount running (please report). And the rest for the new distributions (Engine.pm) ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2444 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--VERSIONS2
-rwxr-xr-xinitramfs/stage3-stuff/init48
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm6
3 files changed, 37 insertions, 19 deletions
diff --git a/VERSIONS b/VERSIONS
index 18b30d47..43b6c6a1 100644
--- a/VERSIONS
+++ b/VERSIONS
@@ -1,4 +1,4 @@
OPENSLX_VERSION_MAJOR="4"
OPENSLX_VERSION_MINOR="9"
-OPENSLX_VERSION_RELEASE="3"
+OPENSLX_VERSION_RELEASE="5"
OPENSLX_VERSION_STRING="${OPENSLX_VERSION_MAJOR}.${OPENSLX_VERSION_MINOR}.${OPENSLX_VERSION_RELEASE}${OPENSLX_SVN_SNAPSHOT:+rev$OPENSLX_VERSION_SVNREV}"
diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init
index e298f457..bd917fce 100755
--- a/initramfs/stage3-stuff/init
+++ b/initramfs/stage3-stuff/init
@@ -156,11 +156,15 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup
chmod u+x /bin/debugshell
getty -i -n -l /bin/debugshell 38400 tty2 &
# start logging (debuglevel >=3)
+ # fixme: SuSE hangs in Creating /var/log/boot.msg if activated
echo "Syslogd started on third console (tty3)"
- syslogd -C2048
- logread -f > /dev/tty3 &
- logread -f >> /var/log/messages &
- klogd
+ # just to have some name in syslog
+ echo "(slx init)" >/proc/sys/kernel/hostname
+ #syslogd -C2048
+ syslogd #-O /var/log/messages
+ klogd
+ #logread -f > /dev/tty3 2>/dev/null &
+ #logread -f >> /var/log/messages 2>/dev/null &
fi
;;
# essid for WLAN boot (experimental, might be moved to a module component
@@ -359,8 +363,6 @@ else
# modprobe should stay quiet
MODPRV="-q"
LOGFILE="/dev/null"
- # redirect console (after /dev/null is available, and /dev mounted)
- #[ "${DEBUGLEVEL}" != 8 ] && exec < /dev/console > /dev/null 2>&1
fi
# check for WLAN specific settings and check for multiple ethernet interfaces
@@ -441,14 +443,15 @@ if [ -z "$nodhcp" ] ; then
waitfor /tmp/dhcp-done 20000
. /tmp/confviadhcp
# by now there should be a proper ip configuration present
- if [ -z "$clientip" -o -z "$subnet_mask" -o -z "$gateway" -o \
- -z "$broadcast_address" ] ; then error "$init_errdhcp"
+ if [ -z "$clientip" -o -z "$subnet_mask" -o -z "$broadcast_address" ]
+ then error "$init_errdhcp"
else
{ ip addr add \
$clientip/$(ipcalc -s -p $clientip $subnet_mask|sed s/.*=//) \
- broadcast $broadcast_address dev $nwif 2>/dev/null && \
- ip route add default via $gateway 2>/dev/null; } || \
- error "$init_erripcfg"
+ broadcast $broadcast_address dev $nwif 2>/dev/null || \
+ error "$init_erripcfg"; }
+ # if gateway is available set it
+ [ -n $gateway ] && ip route add default via $gateway 2>/dev/null
fi
# fixme: to be checked!!
# else
@@ -484,7 +487,7 @@ if [ -n "${bldmod}" ] ; then
for module in ${bldmod} ; do
modprobe ${MODPRV} ${module} || error "$init_errbld"
done
- [ -x /bin/mdev ] && mdev -s
+ mdev -s
[ -z "$bldrfst" ] && bldrfst=squashfs
bldhost=$(checkip $bldhost)
if [ $DEBUGLEVEL -eq 20 ] ; then
@@ -495,6 +498,9 @@ if [ -n "${bldmod}" ] ; then
# fixme: check for fs in /proc/filesystems before trying to load the module
modprobe ${MODPRV} ${bldrfst} || error "$init_errbld" nonfatal
+ # for debugging: interface might not be properly up - check reachability
+ [ $DEBUGLEVEL -ge 1 ] && ping -c 1 -w 15 ${bldhost} >/dev/null 2>&1
+
case "${srvproto}" in
# network block device present in standard kernel
nbd)
@@ -651,6 +657,8 @@ if [ -z "${bldmod}" -a -z "${bldserver}" ] ; then
# we got a problem here
error "$init_nfssp" fatal
fi
+ # interface might not be properly up - check reachability
+ ping -c 1 -w 15 ${nfsserver} >/dev/null 2>&1
for proto in tcp udp fail; do
[ $proto = "fail" ] && { error "$init_nfs"; break; }
mount -n -t nfs -o ro,nolock,${proto} ${nfsroot} /mnt && break
@@ -924,7 +932,6 @@ sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab
umount -n /sys || error "$init_errsys" nonfatal
umount -n /proc/bus/usb >/dev/null 2>&1
chmod 1777 /mnt/dev/shm /mnt/tmp 2>/dev/null
-mount -n --move /dev /mnt/dev
runinithook '95-cleanup'
@@ -934,13 +941,20 @@ killall -9 hwautocfg servconfig debugshell hwinfo 2>/mnt/dev/null
[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
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
-# move logfile into stage4 filesystem (if exists)
+[ -f /tmp/watchdogpid ] && kill $(cat /tmp/watchdogpid) 2>/dev/null
+# stop logging services if required and move logfile into stage4 filesystem
+# (if exists)
+killall klogd 2>/dev/null
[ -f /var/log/slx-boot.log ] && mv /var/log/slx-boot.log \
/mnt/var/log/slx-s3boot.log && cp /var/log/messages \
- /mnt/var/log/messages_slx
+ /mnt/var/log/messages 2>/dev/null
+# if no syslog plugin was configured, start the daemon again writing to no
+# logfile directly (useless fake test as placeholder)
+#[ ! -e syslog ] && syslogd -O /mnt/var/log/testfile
-# unmount /proc and unset all old,unneeded environment variables
+# move /dev and unmount /proc and unset all old, unneeded environment
+# variables
+mount -n --move /dev /mnt/dev
umount -n /proc
unset client debug date initrd ip bldroot nfsroot rootfs ticks vci vga
unset BOOT_IMAGE KCMDLINE KERNEL MODPRV NWMODULES OLDPWD UDEVD_EVENT_TIMEOUT \
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 01dbb6a9..60be922f 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2007 - OpenSLX GmbH
+# Copyright (c) 2006..2008 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -41,6 +41,7 @@ use vars qw(%supportedDistros);
'debian-3.1' => 'clone,install,update,shell',
'debian-4.0' => 'clone,install,update,shell',
'debian-4.0_amd64' => 'clone,install,update,shell',
+ 'debian-5.0' => 'clone,update,shell',
'fedora-6' => 'clone,install,update,shell',
'fedora-6_x86_64' => 'clone,install,update,shell',
'gentoo-2007.X' => 'clone',
@@ -52,6 +53,8 @@ use vars qw(%supportedDistros);
'suse-10.3_x86_64' => 'clone,update,shell',
'suse-11.0' => 'clone,update,shell',
'suse-11.0_x86_64' => 'clone,update,shell',
+ 'suse-11.1' => 'clone,update,shell',
+ 'suse-11.1_x86_64' => 'clone,update,shell',
'ubuntu-7.04' => 'clone,install,update,shell',
'ubuntu-7.04_amd64' => 'clone,install,update,shell',
'ubuntu-7.10' => 'clone,update,shell',
@@ -59,6 +62,7 @@ use vars qw(%supportedDistros);
'ubuntu-8.04' => 'clone,update,shell',
'ubuntu-8.04_amd64' => 'clone,update,shell',
'ubuntu-8.10' => 'clone,update,shell',
+ 'ubuntu-8.04_amd64' => 'clone,update,shell',
);
my %localHttpServers;