diff options
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
| -rw-r--r-- | initramfs/initrd-stuff/etc/functions | 44 |
1 files changed, 7 insertions, 37 deletions
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 <dvs@OpenSLX.com>, 15-12-2006 +# Dirk von Suchodoletz <dvs@OpenSLX.com>, 17-12-2006 # Felix Endres, 30-04-2006 # <mj0@uni-freiburg.de> (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" |
