summaryrefslogtreecommitdiffstats
path: root/initrd/mkdxsinitrd
diff options
context:
space:
mode:
authorFelix Endres2006-02-10 12:56:27 +0100
committerFelix Endres2006-02-10 12:56:27 +0100
commitdf2e9536f00aeac555180754afcf0be40a6f7104 (patch)
treef1ebd0a47d9fcb82407afb2eade1e65e8aed5dbf /initrd/mkdxsinitrd
parenttests and extensions for distributed network block device ... (diff)
downloadcore-df2e9536f00aeac555180754afcf0be40a6f7104.tar.gz
core-df2e9536f00aeac555180754afcf0be40a6f7104.tar.xz
core-df2e9536f00aeac555180754afcf0be40a6f7104.zip
Neues Standardnetzwerkmodul
Distroerkennungsverbesserung Udevfehlersuche git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@70 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/mkdxsinitrd')
-rwxr-xr-xinitrd/mkdxsinitrd28
1 files changed, 20 insertions, 8 deletions
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 <distro-name> -v <distro-version)"
+ exit 1;
+ fi
fi
case "${DISTRO}" in
@@ -270,6 +281,7 @@ case "${DISTRO}" in
case "${DISTRO_VER}" in
Breezy*|breezy*|*)
DISTRO_VER=5.10
+ cp ${ROOTDIR}/lib/libnss_compat.so.2 ${INSTDIR}/lib
;;
esac
;;
@@ -297,12 +309,12 @@ case "${DISTRO}" in
;;
esac
- # hotplug/udev style and stuff
- cp -a ${ROOTDIR}/etc/udev ${INSTDIR}/etc
#cp -a /etc/sysconfig/{hardware,network} ${INSTDIR}/etc/sysconfig
;;
esac
+# hotplug/udev style and stuff
+cp -a ${ROOTDIR}/etc/udev ${INSTDIR}/etc
# an dieser stelle sollte jetzt sichergestellt sein, dass sowohl DISTRO als auch DISTRO_VER eindeutig gesetzt sind!
@@ -311,8 +323,8 @@ esac
copy_distro_stuff ${DISTRO} ${DISTRO_VER}
# devices needed rather early (copied from /tmp to /dev in init)
-mknod ${INSTDIR}/tmp/console c 5 1 &>/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"