summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-24 02:30:14 +0100
committerDirk von Suchodoletz2006-03-24 02:30:14 +0100
commitda149fc84bb701f1705482d224dcab75c3b7dea9 (patch)
treed47c3a803446abe83f2d20bd2a369a0d0969ad59 /initrd
parentinstaller: rsync again (diff)
downloadcore-da149fc84bb701f1705482d224dcab75c3b7dea9.tar.gz
core-da149fc84bb701f1705482d224dcab75c3b7dea9.tar.xz
core-da149fc84bb701f1705482d224dcab75c3b7dea9.zip
integration of vmware module. hw modules to ignore for loading ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@126 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/distro-specs/debian/config-3.14
-rw-r--r--initrd/distro-specs/gentoo/config-2005.16
-rw-r--r--initrd/distro-specs/suse/config-9.36
-rw-r--r--initrd/distro-specs/suse/functions-9.312
-rw-r--r--initrd/distro-specs/ubuntu/config-5.102
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg11
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig13
-rw-r--r--initrd/initrd-stuff/etc/machine-setup6
-rw-r--r--initrd/initrd-stuff/etc/vmware-prep38
-rwxr-xr-xinitrd/mkdxsinitrd3
10 files changed, 61 insertions, 40 deletions
diff --git a/initrd/distro-specs/debian/config-3.1 b/initrd/distro-specs/debian/config-3.1
index a4d2f48d..7c935fb5 100644
--- a/initrd/distro-specs/debian/config-3.1
+++ b/initrd/distro-specs/debian/config-3.1
@@ -1,6 +1,6 @@
# Description: distro specific settings for Debian/Sarge
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 16-01-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
# Blablub
#
# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg
@@ -21,6 +21,8 @@
# /etc/X11/xorg.conf or /etc/X11/XF86config, ...
# D_XFONTPATH - path(es) where X11 fonts are installed (with trailing /*)
# D_DEFAULTCOUNTRY - localization (see common functions)
+# D_HWMODTOIGNORE - hardware modules which should not tried to load (because
+# already in kernel, nonexistent, ...)
D_SYSCONFDIR=/default
D_ETCEXCL="etc/gconf/*\n*.old\n*-\n\
diff --git a/initrd/distro-specs/gentoo/config-2005.1 b/initrd/distro-specs/gentoo/config-2005.1
index 77716408..5a544e30 100644
--- a/initrd/distro-specs/gentoo/config-2005.1
+++ b/initrd/distro-specs/gentoo/config-2005.1
@@ -1,6 +1,6 @@
# Description: distro specific settings for Gentoo
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 21-01-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
#
# Copyright: (c) 2005,6 - RZ Universitaet Freiburg
@@ -16,6 +16,10 @@
# anyhow
# D_BINDMNT - any code which is specific in bind mount environment
# D_RCDIRS - runlevel directories relative to /etc
+# D_HWMODTOIGNORE - hardware modules which should not tried to load (because
+# already in kernel, nonexistent, ...)
+
+
D_SYSCONFDIR=conf.d
D_ETCEXCL="opt/gnome/gconf/*\n*.old\n*-\n\
etc/autoinstall\nlogrotate*\nbootloader\n*~\n\
diff --git a/initrd/distro-specs/suse/config-9.3 b/initrd/distro-specs/suse/config-9.3
index 4dc89eb0..fc6d6a07 100644
--- a/initrd/distro-specs/suse/config-9.3
+++ b/initrd/distro-specs/suse/config-9.3
@@ -2,7 +2,7 @@
# is the base for following SuSE versions until the changes
# within them require a major change
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
#
# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg
@@ -23,6 +23,8 @@
# /etc/X11/xorg.conf or /etc/X11/XF86config, ...
# D_XFONTPATH - path(es) where X11 fonts are installed (with trailing /*)
# D_DEFAULTCOUNTRY - localization (see common functions)
+# D_HWMODTOIGNORE - hardware modules which should not tried to load (because
+# already in kernel, nonexistent, ...)
D_SYSCONFDIR=/sysconfig
D_ETCEXCL="opt/gnome/gconf/*\n*.old\n*-\n*.rpmorig\n*.rpmnew\n\
@@ -47,4 +49,4 @@ D_INITSCRIPTS="boot.udev boot.proc boot.shm boot.klog boot.loadmodules boot.cloc
D_XF86CONFFILE="/etc/X11/xorg.conf"
D_XFONTPATH="/usr/X11R6/lib/X11/fonts/*"
D_DEFAULTCOUNTRY="de"
-
+D_HWMODTOIGNORE="i8xx_tco ichxrom"
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 0072fd27..6bf69f2c 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -4,7 +4,7 @@
# functions file). This file is the main base for the
# following SuSE distributions
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
# Blabla
# Blub
#
@@ -445,6 +445,16 @@ echo -e "\trc_status -v\n\t;;\nesac\nrc_exit" \
chmod u+x /mnt/etc/${D_INITDIR}/vmware-prep
rllinker "vmware-prep" "18" "02"
rllinker "vmware" "20" "02"
+# if running start scripts in parallel vmware-prep is not recognized
+# first solution: just avoid running in parallel
+#sed 's/PARALLEL=.*/PARALLEL=no/' /mnt/etc/${D_SYSCONFDIR}/boot \
+# > /tmp/boot
+#cp /tmp/boot /mnt/etc/${D_SYSCONFDIR}/boot
+# second solution: vmware-prep script should be added to .depends.start
+sed -e "s,TARGETS =,TARGETS = vmware-prep," \
+ /mnt/etc/${D_INITDIR}/.depend.start >> /etc/.depend.start
+ echo "vmware-prep: " >> /etc/.depend.start
+ cp /etc/.depend.start /mnt/etc/${D_INITDIR}/.depend.start
}
# initialize boot.ld - skript to be executed during early system startup
diff --git a/initrd/distro-specs/ubuntu/config-5.10 b/initrd/distro-specs/ubuntu/config-5.10
index 7ec484b0..d81ce635 100644
--- a/initrd/distro-specs/ubuntu/config-5.10
+++ b/initrd/distro-specs/ubuntu/config-5.10
@@ -21,6 +21,8 @@
# /etc/X11/xorg.conf or /etc/X11/XF86config, ...
# D_XFONTPATH - path(es) where X11 fonts are installed (with trailing /*)
# D_DEFAULTCOUNTRY - localization (see common functions)
+# D_HWMODTOIGNORE - hardware modules which should not tried to load (because
+# already in kernel, nonexistent, ...)
D_SYSCONFDIR=/default
D_ETCEXCL="etc/gconf/*\n*.old\n*-\n\
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 8a4c5a9e..526e59b6 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -4,7 +4,7 @@
# script for linux diskless clients, using hwconfig from
# knoppix as base tool
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 21-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
# Blabla
# Blub
#
@@ -277,9 +277,12 @@ fi
modprobe ${MODPRV} usbcore &
# "drivers" (pseudo, placeholder strings, ...) to exclude from loading
-DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev"
+# depending on distro more hw modules have to be excluded too. use the
+# D_HWMODTOIGNORE for that purpose
+DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev\
+ ${D_HWMODTOIGNORE} "
# driver blacklist (real modules which fail to load)
-DRIVERLIST=${DRIVERLIST}" hw_random ichxrom kanotix genericwheelusb "
+DRIVERLIST=${DRIVERLIST}"hw_random kanotix genericwheelusb "
# hack for pseudo modules (not to load)
for i in $DRIVERLIST ; do
echo -e "alias\t$i\tusbcore" >> /etc/modprobe.conf
@@ -430,7 +433,7 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \
sed -n -e "/ 44 /p"|sed -e "s/[[:space:]].*//") ; do
# ugly message from ext2 mount :-(
( mkfs.ext2 -q $hdpartnr; mount -n $hdpartnr /mnt/tmp; \
- echo "finished" > /tmp/tmpready ) &
+ echo "$hdpartnr" > /tmp/tmpready ) &
echo -e "$hdpartnr\t/tmp\t\text2\t\tdefaults\t 0 0" >> /mnt/etc/fstab
part44=yes
break
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 8c8172a8..d7f784c0 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -338,6 +338,19 @@ config_nscd
# preparation of /tmp directory (partition 44, nfs scratch, ramdisk)
waitfor /tmp/tmpready 10000
# create some directories and correct permissions
+tmpisdisk=`sed -n '/\/tmp/p' /mnt/etc/fstab`
+# if there is no local disk partition for /tmp then try to mount a rw
+# NFS scratch space (if defined in $scratch) and prepared on server
+if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
+ mkdir -p /tmp/scratch >/dev/null 2>&1
+ mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid ${scratch} \
+ /tmp/scratch >/dev/null 2>&1 && {
+ mkdir -p /tmp/scratch/${clientip} >/dev/null 2>&1
+ umount /tmp/scratch
+ mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid \
+ ${scratch}/${clientip} /mnt/tmp >/dev/null 2>&1; }
+fi
+chmod 1777 /mnt/tmp
for i in \
/tmp/.ICE-unix \
/tmp/.X11-unix; do testmkd /mnt/$i; done
diff --git a/initrd/initrd-stuff/etc/machine-setup b/initrd/initrd-stuff/etc/machine-setup
index 1468997b..232d727c 100644
--- a/initrd/initrd-stuff/etc/machine-setup
+++ b/initrd/initrd-stuff/etc/machine-setup
@@ -88,11 +88,11 @@ automnt_dir="/home"
automnt_src="10.8.4.254:/home"
# scratch space on server
-scratch="$serverip:/dxs/tmp"
+scratch="132.230.4.71:/dxs/tmp"
# configure and start vmware services
-vmware="no"
-imgsrv="$serverip:/dxs/vmware"
+vmware="yes"
+imgsrv="132.230.4.71:/dxs/vmware"
# kind of X11 display manager to run
start_xdmcp="xdm"
diff --git a/initrd/initrd-stuff/etc/vmware-prep b/initrd/initrd-stuff/etc/vmware-prep
index 8f2f037e..e2eec061 100644
--- a/initrd/initrd-stuff/etc/vmware-prep
+++ b/initrd/initrd-stuff/etc/vmware-prep
@@ -29,34 +29,19 @@
# Declaration of default variables
vmdir="/var/lib/vmware"
path="/var/X11R6/bin"
-part44=
sessions=
session_name=
### FUNCTIONS SECTION ##########################################################
-# mount scratch on server, but only if no 44 partition mounted
-mount_scratch () {
- part44=$(grep -i "/tmp.*ext2" /etc/fstab)
- if [ -n "${scratch}" -a -z "${part44}" ]; then
- mkdir -p /tmp/scratch >/dev/null 2>&1
- mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid ${scratch} \
- /tmp/scratch >/dev/null 2>&1
- mkdir -p /tmp/scratch/${clientip} >/dev/null 2>&1
- mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid \
- ${scratch}/${clientip} /tmp >/dev/null 2>&1 &
- chmod 1777 /tmp 2>&1
- fi
-}
-
-
# loop file for exchanging information between linux and vmware
mount_loop () {
+ modprobe loop >/dev/null 2>&1
mkdir -p /media/loop0
- cp ${vmdir}/templ/fd0.img /tmp/scratch/${clientip}-fd0.img
- chmod a+rw /tmp/scratch/${clientip}-fd0.img
- mount -t msdos -o loop,umask=000 /tmp/scratch/${clientip}-fd0.img \
+ cp ${vmdir}/templ/fd0.img /tmp/${clientip}-fd0.img
+ chmod a+rw /tmp/${clientip}-fd0.img
+ mount -t msdos -o loop,umask=000 /tmp/${clientip}-fd0.img \
/media/loop0
}
@@ -72,14 +57,15 @@ vmnet () {
# special start script for vmware with predefined image
Xpath () {
- if test -w /usr/X11R6/bin ; then
+ if `touch /usr/X11R6/bin/touch >/dev/null 2>&1`; then
+ rm /usr/X11R6/bin/touch >/dev/null 2>&1
path="/usr/X11R6/bin"
- cp ${vmdir}/import/templ/runvmware \
+ cp ${vmdir}/templ/runvmware \
/usr/X11R6/bin
else
path="/var/X11R6/bin"
test -d /var/X11R6/bin || mkdir -p /var/X11R6/bin
- cp ${vmdir}/import/templ/runvmware \
+ cp ${vmdir}/templ/runvmware \
/var/X11R6/bin
fi
}
@@ -103,9 +89,10 @@ vmsession2desktop_session () {
sessions=$(ls ${vmdir}/vmsessions/*.desktop)
if [ -n "${sessions}" ]; then
for i in ${vmdir}/vmsessions/*.desktop; do
- session_name=$(cat ${vmdir}/vmsessions/${i} | grep -iw "exec" \
+ session_name=$(cat ${i} | grep -iw "exec" \
| awk -F "=" '{print $2}')
cp ${path}/desktop-session ${path}/${session_name}
+ chmod 755 ${path}/${session_name} >/dev/null 2>&1
done
fi
}
@@ -114,14 +101,11 @@ vmsession2desktop_session () {
### START SCRIPT ###############################################################
-echo -n "Starting preparation of vmware environment"
-
# create vmdir
mkdir -p /var/lib/vmware 2>&1
# mount von zeugs
-mount -t nfs -o ro,nolock,intr,nodev,soft,timeo=2,nosuid ${imgsrv} ${vmdir} &
-mount_scratch
+mount -t nfs -o ro,nolock,intr,nodev,soft,timeo=2,nosuid ${imgsrv} ${vmdir}
# device creation - the module does not trigger udev properly
vmnet
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index 7dad4125..627fdc4a 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -3,7 +3,7 @@
# Description: universal (distro independent) generator for initial
# ramdisks for linux diskless clients
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
# Nico Dietrich
# Blub
#
@@ -28,6 +28,7 @@ COMDIRINDXS="/tmp/scratch /var/lib/nobody"
# anyhow
# D_BINDMNT - any code which is specific in bind mount environment
# D_RCDIRS - runlevel directories relative to /etc
+# D_HWMODTOIGNORE -
D_SYSCONFDIR="<set in ~/distro-config/distro file>"
D_ETCEXCL="<set in ~/distro-config/distro file>"