From c392fef97b564badfd0e4d7e9181768034211d15 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 17 Dec 2006 18:55:55 +0000 Subject: Improved "watchdog" for auto power off, if stage3 does not complete after around two minutes. Removed klibc stuff (ipconfig, nfsmount) which was never really in use (klibc is deprecated and the busybox approach seems much more promising to keep the initramfs small and flexible). Little cleanups ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@564 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 44 ++++++------------------------------ initramfs/initrd-stuff/etc/messages | 6 ++--- 2 files changed, 9 insertions(+), 41 deletions(-) (limited to 'initramfs/initrd-stuff/etc') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index aa0a8225..24685df1 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # (included by init, hwautocfg, servconfig, ... within OpenSLX initial # ramfs) # -# Dirk von Suchodoletz , 15-12-2006 +# Dirk von Suchodoletz , 17-12-2006 # Felix Endres, 30-04-2006 # (xenbr), 12-12-2006 # Tobias Maier @@ -264,7 +264,7 @@ local nm=$2 local gw=$3 local bc=$4 local if=$5 -for ipcfg in ip ipconfig ifconfig none; do +for ipcfg in ip ifconfig none; do test -x /bin/$ipcfg && break; done case $ipcfg in @@ -281,12 +281,7 @@ case $ipcfg in [ -n "$nbdhost" ] && [ `echo $nbdhost|sed "s,\..*,,"` -ge 224 ] && \ ip route add 224.0.0.0/4 dev eth0 ;; - # the klibc ip configuration / dhcp client tool - ipconfig) - # fixme: to be checked - ipconfig $ip::$gw:$nm:$if:none - MAC="" - ;; + # the klibc ip configuration / dhcp client tool is deprecated # traditional ifconfig/route - if a distro does not provide ip ifconfig) if [ "$ip" = "0.0.0.0" ]; then @@ -326,28 +321,12 @@ local nfsroot=$1 local dest=$2 local ret=0 [ -z "$dest" ] && dest="/mnt" -for mnt in nfsmount mount none; do - test -x /bin/$mnt && break; -done # often nfs is just a module and not compiled directly into the kernel [ -f /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko ] && \ loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko "$error_modnfs" -case $mnt in - # the klibc nfs mount tool (includes portmap) - nfsmount) - nfsmount -o ro $nfsroot $dest || ret=1 - ;; - # the standard mount; portmap is needed ... - mount) - portmap || { echo "$error_portm"; ret=1; } - # fixme: busybox mount uses nfs ... - mount -n -t nfs -o ro,nolock $nfsroot $dest || ret=1 - killall -9 portmap 2>/dev/null - ;; - none) - error "$error_mntt" - ;; -esac +# busybox mount has to be compiled with nfs mount support otherwise +# --> error "$error_mntt" +mount -n -t nfs -o ro,nolock $nfsroot $dest || ret=1 return $ret } ############################################################################# @@ -384,7 +363,7 @@ fi rundhcp () { local vci="$1" -for dhcp in dhclient dhcpcd pump ipconfig udhcpc none; do +for dhcp in dhclient dhcpcd pump udhcpc none; do test -e /bin/$dhcp && break; done if [ "$dhcp" = "none" ] ; then @@ -416,15 +395,6 @@ case $dhcp in pump) error "$error_pump" ;; - ipconfig) - [ $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 \ -command line)." >> /etc/machine-setup - error "$error_ipconf" - ;; # udhcpc is part of busybox udhcpc) [ -n $vci ] && vci="-V $vci" diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages index 2136cc0f..1eb35d79 100644 --- a/initramfs/initrd-stuff/etc/messages +++ b/initramfs/initrd-stuff/etc/messages @@ -2,10 +2,10 @@ # bootup (within initialramfs) for OpenSLX linux diskless clients version 4 # this file could be used for localization of error messages # -# Dirk von Suchodoletz , 29-10-2006 +# Dirk von Suchodoletz , 17-10-2006 # # (c) 2006 - RZ Universitaet Freiburg -# (c) 2006 - OpenSLX.org +# (c) 2006 - OpenSLX.ORG Project # messages from (slx) init init_errmsg="functions file contains a lot of script \ @@ -109,8 +109,6 @@ error_dhclient=" Fatal error occured while trying to run dhclient.\n\ $error_dhcp" error_dhcpcd=" Fatal error occured while trying to run dhcpcd.\n$error_dhcp" error_pump=" Config via pump not implemented yet.\n$error_dhcp" -error_ipconf=" Config via ipconfig (from klibc) not implemented yet.\n\ -$error_dhcp" error_ldapcfg=" The configuration via ldap is not implemented yet." error_errdcfg=" Did not get any configuration data via dhcp until now ..." error_errfcfg=" Did not get any configuration data via tftp until now ..." -- cgit v1.2.3-55-g7522