summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg8
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig35
-rw-r--r--initrd/initrd-stuff/etc/functions87
-rwxr-xr-xinitrd/initrd-stuff/init27
-rwxr-xr-xinitrd/mkdxsinitrd12
-rw-r--r--installer/default_files/hwdata/Cards.local (renamed from initrd/initrd-stuff/usr/share/hwdata/Cards.local)11
-rw-r--r--installer/default_files/hwdata/pcitable.local (renamed from initrd/initrd-stuff/usr/share/hwdata/pcitable.local)4
-rw-r--r--installer/default_files/machine-setup.default10
-rwxr-xr-xinstaller/ld4-inst6
9 files changed, 139 insertions, 61 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 827611c5..866ea0d5 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>, 10-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 15-07-2006
# Felix Endres
#
# Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg
@@ -428,9 +428,9 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \
# we use special non assigned partition type for harddisk scratch space
for hdpartnr in $(cat /tmp/hd_part | \
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 "$hdpartnr" > /tmp/tmpready ) &
+ # ext2fs_check_if_mount message supressed
+ ( mkfs.ext2 -Fq $hdpartnr 2>/dev/null; mount -n -o nocheck,noexec \
+ $hdpartnr /mnt/tmp 2>/dev/null; echo "$hdpartnr" > /tmp/tmpready ) &
echo -e "$hdpartnr\t/tmp\t\text2\t\tdefaults\t 0 0" >> /tmp/fstab
part44=yes
break
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index b6d5aedb..0239e401 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -4,7 +4,7 @@
# for linux diskless clients (executed within initial
# ramdisk)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-07-2006
# Michael Janczyk, 31-05-2006
# Lars Mueller, 23-06-2006
# Oliver Tappe, 23-06-2006
@@ -83,9 +83,19 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then
if [ -d /mnt/usr/share/vmware ] ; then
ln -sf /usr/share/vmware /mnt/var/lib/vmware
elif [ -n "${imgsrv}" ] ; then
- # # more general mount script should be used here!?
+ # get type, server, path of VMware image export
+ vmimgsprot=$(uri_token $imgsrv prot)
+ vmimgsserv=$(uri_token $imgsrv server)
+ vmimgspath="/$(uri_token $imgsrv path)"
+ case "$vmimgsprot" in
+ *nbd)
+ ;;
+ *)
+ # # more general mount script should be used here!?
nfsmnt ${imgsrv} /mnt/var/lib/vmware || {
error "$scfg_nfs" nonfatal; noimg=yes; }
+ ;;
+ esac
fi
fi
@@ -324,15 +334,24 @@ 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
+# scratch space (if defined in $scratch) and prepared on server
if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
+ scrproto=$(uri_token $FILESRC prot)
+ scrpath=$(uri_token $FILESRC path)
mkdir -p /tmp/scratch >/dev/null 2>&1
- mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid ${scratch} \
+ case "$scrproto" in
+ nbd)
+ # exports have to be per client!!
+ ;;
+ *)
+ 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; }
+ 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; }
+ ;;
+ esac
fi
chmod 1777 /mnt/tmp
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index e354c2ce..b05291b9 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -2,13 +2,13 @@
# linux diskless clients (included by init, hwautocfg,
# servconfig, ... within initial ramdisk)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-07-2006
# Felix Endres, 30-04-2006
# Tobias Maier
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.5.0b
+# Version: 0.5.1a
#######################################################################
# set of empty dummy functions (loaded before real functions in the
@@ -112,7 +112,48 @@ return 0
ldcfg () {
[ -z "${NOLDSC}" ] && echo "$init_ldcfg" && ldconfig /tmp/ld.so.cache &
}
-
+#######################################################################
+# URI interpreter $1 variable to interprete, $2 type of token to return
+# prot: tftp, http, nbd, ... server: IP or FQDN
+uri_token () {
+local var=$1
+# first check if URI starts with prot:// - URI scheme
+if strinstr "://" "$1" ; then
+ prot=${var%://*}
+ rest=${var#*://}
+else
+ rest="$var"
+ prot=""
+fi
+# get the server IP or name and port - URI authority
+# you get the path or other token without leading "/" - add it later if
+# needed
+if strinstr ":" "$rest" ; then
+ server="${rest%:*}"
+ rest="${rest#*:}"
+ path="${rest#*/}"
+ port="${rest%/$path}"
+else
+ server="${rest%/*}"
+ rest="${rest#*/}"
+ path="${rest#*/}"
+ port=""
+fi
+# get path and query components - URI path, query
+query=""
+if strinstr "\?" "$rest" ; then
+ path="${path%\?*}"
+ query="${rest#*\?}"
+fi
+# return the requested token
+case "$2" in
+ prot) echo "$prot" ;;
+ server) echo "$server" ;;
+ path) echo "$path" ;;
+ port) echo "$port" ;;
+ query) echo "$query" ;;
+esac
+}
#######################################################################
# load a certain module - name of module with path in argument one, the
# error message in second argument
@@ -308,32 +349,34 @@ echo "dhcp finished" > /tmp/dhcp-done
# kernel command line)
# tftpget is helper function for fileget
tftpget () {
-# $1 is type of tftp command, $2 is config file name to get, $3 IP of
-# server to get file from
-local dst=/tmp/$(basename $2)
-case "$1" in
+# $1 is config file name to get, $2 IP of server to get file from
+for tftp in /bin/atftp /bin/tftp ; do
+ test -x $tftp && break
+done
+echo -e "tftp\t69/tcp\ntftp\t69/udp" > /etc/services
+local dst=/tmp/$(basename $1)
+case "$tftp" in
*/atftp)
- atftp -g -r $2 -l $dst $3 2> /dev/null
+ atftp -g -r $1 -l $dst $2 2> /dev/null
;;
*/tftp)
# distinguish between busybox tftp and standalone (in.tftp) client
if [ -x /bin/busybox ] ; then
- tftp -g -r $2 -l $dst $3 2> /dev/null
+ tftp -g -r $1 -l $dst $2 2> /dev/null
else
- echo "get $2 $dst" | tftp $3 2> /dev/null
+ echo "get $1 $dst" | tftp $2 2> /dev/null
fi
;;
esac
}
fileget () {
-# get type of tftp available
-for tftp in /bin/atftp /bin/tftp ; do
- test -x $tftp && break
-done
-echo -e "tftp\t69/tcp\ntftp\t69/udp" > /etc/services
+# get type of tftp available, alternatively use wget for ftp or http
+# (fixme: rewrite of fileget needed!!)
+# analyze file soure (URI) in $FILESRC
if [ -n "$FILESRC" ] ; then
- cfgfile=${FILESRC#*:}
- tftpserver=${FILESRC%:*}
+ srvproto=$(uri_token $FILESRC prot)
+ cfgfile="/$(uri_token $FILESRC path)"
+ tftpserver=$(uri_token $FILESRC server)
tftpget $tftp $cfgfile $tftpserver
else
cfgdir="/tftpboot/client-config/"
@@ -348,14 +391,14 @@ and as last\n# distro/client" >> /tmp/confviafile
for cfgfile in $cfgdir/default $cfgdir/01-$mac \
$cfgdir/$DISTRO/default $cfgdir/$DISTRO/01-$mac ; do
echo "# -> $cfgfile" >> /tmp/confviafile
- if tftpget $tftp $cfgfile $tftpserver ; then
+ if tftpget $cfgfile $tftpserver ; then
cat /tmp/$(basename $cfgfile) >> /tmp/confviafile
else
echo -e "# ... this file does not exist on server." >> /tmp/confviafile
fi
done
fi
-echo "tftp finished" > /tmp/file-done
+echo "fileget via $srvproto finished" > /tmp/file-done
}
#######################################################################
@@ -767,9 +810,9 @@ case "${XMODULE}" in
radeon)
# check ${XDESC}/ hwsetup.info device string in Cards file and then
# for needed components
- test -f /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko && \
- test -f /mnt/usr/X11R6/lib/modules/drivers/fglrx_drv.o && \
- XMODULE=fglrx
+ test -f /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko \
+ && test -f /mnt/usr/X11R6/lib/modules/drivers/fglrx_drv.o && \
+ XMODULE=fglrx
# there seems no problem, if no TV is connected
TVOUT='\tOption\t\t"TVFormat" "PAL-B"\n
\tOption\t\t"DesktopSetup" "horizontal"'
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index 2cbc49cd..2686cfde 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,12 +2,12 @@
# Description: main script for new type of initial ramdisk for
# linux diskless clients version 4
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-07-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
# (c) 2006 - odlx.org project
#
-# Version: 0.2.6a
+# Version: 0.2.6d
# functions common for all distros, messages contains all error and info
# output
@@ -103,7 +103,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
# if (external, via tftp) configuration file retrieval should
# be triggered, if no source is given try dhcp server and
# predefined standard path (~/tftpboot/client-conf/default,
- # client-conf/<name-of-export>/default, ...)
+ # client-conf/<name-of-export>/default, ...)
file)
FILE="yes"
rm /tmp/file-done
@@ -248,19 +248,14 @@ fi
if [ -n "${NBD}" ] ; then
# load block device driver if needed
modprobe ${MODPRV} ${NBD} || error "$init_errnbd"
- # get settings for nbd-client
- nbdhost=${NBDOPT%:*}
- nbdopt=${NBDOPT#*:}
- nbdport=${nbdopt%,*}
- nbdfs=${nbdopt#$nbdport*}
- if [ -z "$nbdfs" ]; then
- RFST=ext2;
- else
- RFST=${nbdfs#*,};
- fi
- echo "Diskless client using ${NBD} on $nbdhost:$nbdport with $RFST"
+ # get settings for nbd-client, filesystem equals to path in URI notation
+ nbdhost=$(uri_token $NBDOPT server)
+ nbdport=$(uri_token $NBDOPT port)
+ nbdrfst=$(uri_token $NBDOPT path)
+ [ -z "$nbdrfst" ] && nbdrfst=ext2
+ echo "Diskless client using ${NBD} on $nbdhost:$nbdport with $nbdrfst"
# fixme: check for fs in /proc/filesystems before trying to load the module
- modprobe ${MODPRV} ${RFST} || error "$init_errnbd" nonfatal
+ modprobe ${MODPRV} ${nbdrfst} || error "$init_errnbd" nonfatal
case "${NBD}" in
# network block device present in standard kernel
@@ -319,7 +314,7 @@ if [ -n "${NBD}" ] ; then
# finally mount the block device
for i in 5 40 60 ; do
usleep $i
- mount -n -t $RFST -o $RWRO $RDEV /mnt 2>/dev/null && break
+ mount -n -t $nbdrfst -o $RWRO $RDEV /mnt 2>/dev/null && break
done
fi
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index 05325f13..dd5d1045 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>, 08-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-07-2006
# Nico Dietrich
# Felix Endres
#
@@ -663,6 +663,16 @@ if [ -f /etc/dxs/client.cfg/boot.local.default ] ; then
cp /etc/dxs/client.cfg/boot.local.default ${INSTDIR}/etc/boot.local
fi
+# custom hardware configuration files pcitable.local and Cards.local
+if [ -f /etc/dxs/client.cfg/pcitable.local ] ; then
+ cat /etc/dxs/client.cfg/pcitable.local >> \
+ ${INSTDIR}/usr/share/hwdata/pcitable
+fi
+if [ -f /etc/dxs/client.cfg/Cards.local ] ; then
+ cat /etc/dxs/client.cfg/Cards.local >> \
+ ${INSTDIR}/usr/share/hwdata/Cards
+fi
+
# finally copy user-supplied preinit and postinit files
# fixme: where are these files coming from??
#for i in vendor_preinit vendor_postinit ; do
diff --git a/initrd/initrd-stuff/usr/share/hwdata/Cards.local b/installer/default_files/hwdata/Cards.local
index 82de1257..6e36e5b0 100644
--- a/initrd/initrd-stuff/usr/share/hwdata/Cards.local
+++ b/installer/default_files/hwdata/Cards.local
@@ -3,14 +3,21 @@
# Description: local changes to the Cards file. All additions should be
# documented here, so that they are not lost ...
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-07-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
# (c) 2006 - odlx.org project
#
-# Version: 0.0.1a
+# Version: 0.0.1b
+# Dell GX620
NAME Intel 945
CHIPSET Intel 945
DRIVER i810
NOCLOCKPROBE
+
+# IBM X41
+NAME Intel 915GM
+CHIPSET Intel 915
+DRIVER i810
+NOCLOCKPROBE
diff --git a/initrd/initrd-stuff/usr/share/hwdata/pcitable.local b/installer/default_files/hwdata/pcitable.local
index a5307580..6b3f4764 100644
--- a/initrd/initrd-stuff/usr/share/hwdata/pcitable.local
+++ b/installer/default_files/hwdata/pcitable.local
@@ -5,11 +5,13 @@
# this file seems to be part of RedHat (and others) hardware
# detection tool suite
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-07-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
# (c) 2006 - odlx.org project
#
# Version: 0.0.1a
+0x8086 0x2592 "Card:Intel 915GM"
0x8086 0x2772 "Card:Intel 945"
+0x8086 0x2792 "Card:Intel 915GM"
diff --git a/installer/default_files/machine-setup.default b/installer/default_files/machine-setup.default
index 418b09af..47643d78 100644
--- a/installer/default_files/machine-setup.default
+++ b/installer/default_files/machine-setup.default
@@ -6,7 +6,7 @@
# New settings are simply appended, so that they might
# overwrite previously defined variables
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-07-2006
# Blabla
# Blub
#
@@ -85,17 +85,19 @@ netbios_workgroup="dxs-network"
# automounter home (/local_dir - top level directories only) and source
# (server:/path)
automnt_dir="/home"
-automnt_src="$serverip:/home"
+#automnt_src="$serverip:/home"
-# scratch space on server
+# scratch space on server "proto://$serverip:/dxs/tmp"
scratch="$serverip:/dxs/tmp"
# configure and start vmware services
vmware="no"
-imgsrv="$serverip:/dxs/vmware"
+#imgsrv="(proto://)$serverip:/dxs/vmware"
# kind of X11 display manager to run
start_xdmcp="xdm"
+# for kdm/gdm - enable shutdown option on login screen "user/root/none"
+dm_allow_shutdown="user"
# try to start g/k/xdm with X as fast as possible late_dm="no"
# if there are problems with key, console etc. set late_dm="yes" - adds
diff --git a/installer/ld4-inst b/installer/ld4-inst
index f0b447a1..e3226a2a 100755
--- a/installer/ld4-inst
+++ b/installer/ld4-inst
@@ -4,12 +4,12 @@
# cloning from rsync source for Diskless X Stations (v4.0)
#
# Author(s): Nico Dietrich, 04-04-2006
-# Dirk von Suchodoletz <dirk@goe.net>, 20-05-2006
+# Dirk von Suchodoletz <dirk@goe.net>, 24-07-2006
# mj0, 06-07-06
#
# Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1b
+# Version: 0.2.1c
DEBUG=0
header() {
@@ -454,7 +454,7 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \
echo -e "LABEL ${client_distro}-${current_kernel}-nbd\n\
MENU LABEL $j. ${client_distro}-${client_distro_ver} ${current_kernel} Diskless NBD\n\
KERNEL ${server}::${tftpbootdir}/vmlinuz-${current_kernel}\n\
- APPEND nbdroot=${server}:5000,${nbdfs} initrd=${server}::${tftpbootdir}/initrd-dxs-${current_kernel} \
+ APPEND nbdroot=${server}:5000/${nbdfs} initrd=${server}::${tftpbootdir}/initrd-dxs-${current_kernel} \
apic dhcp noldsc debug=$debuglevel elevator=\"noop\" vci=DXS\n\
ipappend 1\n" >> ${dxs_conf}/${dxs_pxedefault_conf}-${timestamp}
fi