From df2e9536f00aeac555180754afcf0be40a6f7104 Mon Sep 17 00:00:00 2001 From: Felix Endres Date: Fri, 10 Feb 2006 11:56:27 +0000 Subject: Neues Standardnetzwerkmodul Distroerkennungsverbesserung Udevfehlersuche git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@70 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/mkdxsinitrd | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'initrd/mkdxsinitrd') diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 08f40640..0cbcbe1d 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -150,7 +150,7 @@ copy_distro_stuff() { ######################################################################### # End of function declaration -while getopts :hgk:i:r:o:s:f:n:Sut:d:I:V:a: a ; do +while getopts :hgk:i:r:o:s:f:n:Sut:d:v:I:V:a: a ; do case $a in \:|\?) case $OPTARG in k) echo "-k requires kernel version parameter" @@ -169,6 +169,8 @@ while getopts :hgk:i:r:o:s:f:n:Sut:d:I:V:a: a ; do ;; d) echo "-d requires linux distribution name" ;; + v) echo "-v requires linux distribution version" + ;; I) echo "-I requires network interface parameter" ;; a) echo "-a requires a DSDT parameter" @@ -199,6 +201,8 @@ while getopts :hgk:i:r:o:s:f:n:Sut:d:I:V:a: a ; do ;; d) DISTRO=$OPTARG ;; + v) DISTRO_VER=$OPTARG + ;; I) NET_IF=$OPTARG ;; a) acpi_dsdt="$OPTARG" @@ -250,10 +254,17 @@ if [ -z "${DISTRO}" ] ; then if [ -e ${ROOTDIR}/etc/SuSE-release ] ; then DISTRO=suse DISTRO_VER=`grep "VERSION" ${ROOTDIR}/etc/SuSE-release | sed "s/.*= //"` + elif [ -e ${ROOTDIR}/etc/lsb-release ] ; then + . ${ROOTDIR}/etc/lsb-release + DISTRO=${DISTRIB_ID} + DISTRO_VER=${DISTRIB_RELEASE} elif [ -e ${ROOTDIR}/etc/debian_version ] ; then DISTRO=debian DISTRO_VER=`cat ${ROOTDIR}/etc/debian_version` - fi + else + echo "Could not detect client distribution type and version. Please specify as command line argument (-d -v /dev/null -mknod ${INSTDIR}/tmp/null c 1 3 &>/dev/null +mknod ${INSTDIR}/tmp/console c 5 1 #&>/dev/null +mknod ${INSTDIR}/tmp/null c 1 3 #&>/dev/null mknod ${INSTDIR}/tmp/kmsg c 1 11 &>/dev/null #if no klibc - klibc shell seems not to have enough functionality :-( @@ -390,7 +402,7 @@ case "${DISTRO}" in esac # add needed libraries depending on choosen binaries -for lib in `ldd /tmp/dxs-instrd/bin/* 2>/dev/null | sed -e "s,tls,," \ +for lib in `ldd /tmp/dxs-instrd/bin/* 2>/dev/null | sed -e "s,tls,," -e "s,i686/cmov,," \ -ne 's:\t\(.* => \)\?\(/.*\) (0x[0-9a-f]*):\2:p' | sort -u` ; do baselib=`basename ${lib}` test -e ${INSTDIR}/lib/${baselib} || \ @@ -411,7 +423,7 @@ if [ -z "$KERNVER" ] ; then fi if [ -z "$NWMODULES" ] ; then - NWMODULES="e100 tg3 via-rhine r8169" + NWMODULES="e100 tg3 via-rhine r8169 pcnet32" fi if [ -z "$FSMODULES" ] ; then FSMODULES="nbd nfs" -- cgit v1.2.3-55-g7522