From 9b961d44b99dbcef2de02aac8a06036dc8b8cb00 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 11 Aug 2006 16:05:35 +0000 Subject: Changes for new filesystem structure (see BootRootVerzeichnisse) and minor bugfix in old ld4-inst. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@294 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/mkdxsinitrd | 47 +++++++++++++++++++++++++---------------------- installer/ld4-inst | 6 +++--- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 92ad34c0..0d29d2fd 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -1,16 +1,17 @@ #!/bin/bash # # Description: universal (distro independent) generator for initial -# ramdisks for linux diskless clients +# ramdisks for linux diskless clients (stage2 system +# setup) # -# Author(s): Dirk von Suchodoletz , 23-07-2006 +# Author(s): Dirk von Suchodoletz , 11-08-2006 # Nico Dietrich # Felix Endres # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg # (c) 2006 - odlx.org project # -# Version: 0.4.5a +# Version: 0.4.5b # debug level of script itself DEBUG=1 @@ -171,6 +172,7 @@ copy_distro_stuff() { # function files, then append to each the distro/version specific file # variables, functions set in default might that way be overwritten by # definitions in distro/version specific files + # fixme!! files should be taken from /usr/share/opendiskless/distro-specs cat distro-specs/$1/config-default >${INSTDIR}/etc/sysconfig/config cat distro-specs/$1/config-$2 >>${INSTDIR}/etc/sysconfig/config cat distro-specs/$1/functions-default >${INSTDIR}/etc/distro-functions @@ -640,8 +642,14 @@ done chmod 755 ${INSTDIR}/init \ ${INSTDIR}/bin/{servconfig,hwautocfg,screenres,dhcpmkconfig} -# add the common client configuration file -if [ -f /etc/dxs/client.cfg/machine-setup.default ] ; then +# add the common default client configuration file - just to ensure to +# have all major variables defined. !!These settings are most probably +# are overwritten by fileget in stage3 within initramfs!! +if [ -f /var/lib/opendiskless/default/initramfs/machine-setup ] ; then + cp /var/lib/opendiskless/default/initramfs/machine-setup \ + ${INSTDIR}/etc/machine-setup +# just compatibility for older versions +elif [ -f /etc/dxs/client.cfg/machine-setup.default ] ; then cp /etc/dxs/client.cfg/machine-setup.default \ ${INSTDIR}/etc/machine-setup # fixme: dirty hack if the installer does not creates a normal file @@ -658,29 +666,24 @@ disabled\nroot_pw='"'$1$T7VD/mmQ$aCP1WEaWplEsHe9khv4kK.'"'" \ > ${INSTDIR}/etc/machine-setup fi -# custom init script for normal client start after initramfs -# fixme: should be handled the same way as user-supplied init scripts -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 >> \ +# fixme!! New source for these files (instead of templates)! +if [ -f /usr/share/opendiskless/templates/pcitable.local ] ; then + cat /usr/share/opendiskless/templates/pcitable.local >> \ ${INSTDIR}/usr/share/hwdata/pcitable fi -if [ -f /etc/dxs/client.cfg/Cards.local ] ; then - cat /etc/dxs/client.cfg/Cards.local >> \ +if [ -f /usr/share/opendiskless/templates/Cards.local ] ; then + cat /usr/share/opendiskless/templates/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 -# if [ -f /etc/dxs/init.local/"${i}" ] ; then -# cp /etc/dxs/init.local/"$i" ${INSTDIR}/bin/"$i" -# fi -#done +# finally copy user-supplied preinit files. postinit.local and other +# additions are part of fileget tgz (in stage3) +for cfg in ${DISTRO}-${DISTRO_VER}/initramfs/preinit.local \ + default/initramfs/preinit.local ; do + test -f /var/lib/opendiskless/config/$cfg && { + cp /var/lib/opendiskless/config/$cfg ${INSTDIR}; break; } +done # remove unneeded debug info, fixme not really tested yet strip ${INSTDIR}/bin/* ${INSTDIR}/lib/* &>/dev/null diff --git a/installer/ld4-inst b/installer/ld4-inst index a36bb778..7e4c20e7 100755 --- a/installer/ld4-inst +++ b/installer/ld4-inst @@ -4,8 +4,8 @@ # cloning from rsync source for Diskless X Stations (v4.0) # # Author(s): Nico Dietrich, 04-04-2006 -# Dirk von Suchodoletz , 29-07-2006 -# Michael Janczyk, , 06-07-06 +# Dirk von Suchodoletz , 11-08-2006 +# Michael Janczyk, , 06-07-2006 # # Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg # @@ -171,7 +171,7 @@ configure() { # ---> Variablenraten macht eigentlich nur hier Sinn, da sonst ja Werte vom # letzten Mal # if ! [ -z "${netmask}" -a -z "${broadcast}" -a -z "${netname}" -a -z "${server}" ] ; then -# ipcfg=( `ifconfig eth0 | grep "inet addr" | sed -e "s,[a-zA-Z]*:,,g"` ) +# ipcfg=( `ifconfig eth0 | grep "inet " | sed -e "s,[a-zA-Z]*:,,g"` ) # netmask=${ipcfg[3]} # broadcast=${ipcfg[2]} # # quickhack (more intelligent solution needed ...) -- cgit v1.2.3-55-g7522