From 8496797591fe6c68608209fa6884f1e5a42b4588 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 15 Jul 2006 11:22:25 +0000 Subject: Trying on fix for #65 (different handling of kbd settings for SuSE distros), minor other fixes and additions ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@281 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/distro-specs/suse/config-10.1 | 4 ++-- initrd/distro-specs/suse/config-default | 2 +- initrd/distro-specs/suse/functions-10.1 | 30 +++++++++++++++++++++++++----- initrd/distro-specs/suse/functions-default | 14 ++++++-------- initrd/initrd-stuff/bin/hwautocfg | 25 +++++++++---------------- initrd/initrd-stuff/etc/functions | 4 ++-- initrd/initrd-stuff/init | 8 ++++---- initrd/mkdxsinitrd | 1 + 8 files changed, 50 insertions(+), 38 deletions(-) (limited to 'initrd') diff --git a/initrd/distro-specs/suse/config-10.1 b/initrd/distro-specs/suse/config-10.1 index 62ff2db5..5b7babc7 100644 --- a/initrd/distro-specs/suse/config-10.1 +++ b/initrd/distro-specs/suse/config-10.1 @@ -1,7 +1,7 @@ # Description: distro specific settings for SuSE 10.1. This configuration # might change settings from SuSE default configuration file # -# Author(s): Dirk von Suchodoletz , 23-06-2006 +# Author(s): Dirk von Suchodoletz , 15-07-2006 # # Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg @@ -24,5 +24,5 @@ # D_BOOTLOCAL - script for user specified stuff which should be started # during client bootup, path and file relative to /etc -D_INITSCRIPTS="boot.udev boot.proc boot.klog boot.loadmodules boot.clock boot.sysctl boot.ipconfig boot.swap" +D_INITSCRIPTS="kbd boot.udev boot.proc boot.klog boot.loadmodules boot.clock boot.sysctl boot.ipconfig boot.swap" D_RODIRSINRW="/etc/opt/gnome/gconf /etc/X11/xkb /var/adm /var/lib/texmf /var/lib/rpm /var/cache/fontconfig" diff --git a/initrd/distro-specs/suse/config-default b/initrd/distro-specs/suse/config-default index 495ca0f6..ba301908 100644 --- a/initrd/distro-specs/suse/config-default +++ b/initrd/distro-specs/suse/config-default @@ -49,5 +49,5 @@ 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 snd_atiixp_modem" +D_HWMODTOIGNORE="i8xx-tco ichxrom snd-atiixp-modem" D_BOOTLOCAL="init.d/boot.local" diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1 index f52f0924..abf7c45c 100644 --- a/initrd/distro-specs/suse/functions-10.1 +++ b/initrd/distro-specs/suse/functions-10.1 @@ -3,24 +3,26 @@ # General changes should be done there, version specific # changes for the 10.1 here. # -# Author(s): Dirk von Suchodoletz , 08-07-2006 +# Author(s): Dirk von Suchodoletz , 15-07-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.3.0b +# Version: 0.3.0c # some specific stuff to initialize preinit () { # fake the existence of some helper binaries (which are not of any use # within initialramfs) +shell="/bin/sh" +[ -x /bin/busybox ] && shell="/bin/ash" for i in usb_id scsi_id vol_id edd_id ata_id path_id hwup ifup ; do - echo -e "#!/bin/sh\n:" >/sbin/$i + echo -e "#!$shell\n:" >/sbin/$i done mkdir /lib/udev /usr/sbin for i in idedma.sh mount.sh rename_netiface create_floppy_devices ; do - echo -e "#!/bin/sh\n:" >/lib/udev/$i + echo -e "#!$shell\n:" >/lib/udev/$i done -echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl +echo -e "#!$shell\n:" >/usr/sbin/alsactl chmod u+x /sbin/* /lib/udev/* /usr/sbin/* } @@ -74,3 +76,21 @@ PROGRAM=\"/var/X11R6/bin/vm-udev\", OPTIONS=\"ignore_device\"\n\ SUBSYSTEM==\"usb\", ACTION==\"remove\", PROGRAM=\"/var/X11R6/bin/vm-udev\"" \ >> /mnt/etc/udev/rules.d/01-udev-vm.rules } + +# set up keytable (function run in hwautocfg) +# kbd runlevel link is in the list of initial runlevel scripts (see +# config-10.1 file) +keytable () { +# remove unneeded components from the startscript +sed -e "/wanted keytable/,/^fi$/d;/load usb drivers/,/^esac$/d" \ + -i /mnt/etc/${D_INITDIR}/kbd +sed -e "s,KEYTABLE=.*,KEYTABLE=\"${KEYTABLE}\"," \ + -i /mnt/etc/${D_SYSCONFDIR}/keyboard +} + +# consolefont and language (function run in hwautocfg) +consolefont () { +sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ + -i /mnt/etc/${D_SYSCONFDIR}/language +} + diff --git a/initrd/distro-specs/suse/functions-default b/initrd/distro-specs/suse/functions-default index eacc5b5d..2c45ff94 100644 --- a/initrd/distro-specs/suse/functions-default +++ b/initrd/distro-specs/suse/functions-default @@ -29,8 +29,8 @@ export no_proxy" > /mnt/etc/SuSEconfig/profile echo -e "DXS VERSION = 4.0a\nINITRAMFS GENERATION DATE = $date" \ >> /mnt/etc/SuSE-release # add the halt link to the 0 and 6 runlevel directories - ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt - ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot +ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt +ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot # if YaST2 should be runnable (without much effect anyway) on the client testmkd /mnt/var/log/YaST2 } @@ -347,15 +347,13 @@ cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth } # set up keytable (function run in hwautocfg) +# kbd runlevel link is set via config_distro to avoid clashes between +# servconfig and hwautocfg settings keytable () { -# remove unneeded components from the startscript -sed -e "/wanted keytable/,/^fi$/d;/load usb drivers/,/^esac$/d" \ - -i /mnt/etc/${D_INITDIR}/kbd sed -e "s,KEYTABLE=.*,KEYTABLE=\"${KEYTABLE}\"," \ -i /mnt/etc/${D_SYSCONFDIR}/keyboard -# just ensure that keytable is initialized before xdm starts -ln -sf /etc/${D_INITDIR}/kbd /mnt/etc/${D_INITBOOTD}/S01kbd -ln -sf /etc/${D_INITDIR}/kbd /mnt/etc/${D_INITBOOTD}/K20kbd +echo -e "\tloadkeys ${KEYTABLE} >${LOGFILE} 2>&1\n" \ + >>/mnt/etc/${D_INITDIR}/boot.ld } # consolefont and language (function run in hwautocfg) diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 7a592917..827611c5 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 , 09-07-2006 +# Author(s): Dirk von Suchodoletz , 10-07-2006 # Felix Endres # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg @@ -52,20 +52,13 @@ local InputMouseDef='\tIdentifier "Mouse1"\n \tOption\t\t"Buttons"\t\t"3"' local InputMouseSyn='\tIdentifier "Mouse1"\n \tDriver\t\t"synaptics"\n -\tOption\t\t"Protocol"\t\t"auto-dev"\n -\tOption\t\t"Device"\t\t"/dev/psaux"\n -\tOption\t\t"LeftEdge"\t\t"1700"\n -\tOption\t\t"RightEdge"\t\t"5300"\n -\tOption\t\t"TopEdge"\t\t"1700"\n -\tOption\t\t"BottomEdge"\t\t"4200"\n -\tOption\t\t"FingerLow"\t\t"25"\n -\tOption\t\t"FingerHigh"\t\t"30"\n -\tOption\t\t"MaxTapTime"\t\t"180"\n -\tOption\t\t"MaxTapMove"\t\t"220"\n -\tOption\t\t"VertScrollDelta"\t"100"\n -\tOption\t\t"MinSpeed"\t\t"0.06"\n -\tOption\t\t"MaxSpeed"\t\t"0.12"\n -\tOption\t\t"AccelFactor"\t\t"0.0010"' +\tOption\t\t"Protocol"\t\t"explorerps/2"\n +\tOption\t\t"Device"\t\t"/dev/input/mice"\n +\tOption\t\t"Emulate3Buttons"\t"on"\n +\tOption\t\t"Buttons"\t\t"5"\n +\tOption\t\t"InputFashion"\t\t"Mouse"\n +\tOption\t\t"SHMConfig"\t\t"on"\n +\tOption\t\t"ZAxisMapping"\t\t"4 5"' local Monitor='\tIdentifier "Default"\n \tModelName\t"MODEL"\n \tOption\t\t"CalcAlgorithm"\t"CheckDesktopGeometry"\n @@ -455,7 +448,7 @@ done # wait for completion of clients root filesystem in /mnt waitfor /tmp/fscmpl 40000 -cat /tmp/fstab >> /mnt/etc/fstab +[ -f /tmp/fstab ] && cat /tmp/fstab >> /mnt/etc/fstab # add entries to initialize keytable and consolefont to boot.ld # postpone some commands into normal bootup environment diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 2814e29c..06fe9e3d 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -771,8 +771,8 @@ case "${XMODULE}" in 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"TVFormat" "PAL-B"\n -\tOption\t"DesktopSetup" "horizontal"' + TVOUT='\tOption\t\t"TVFormat" "PAL-B"\n +\tOption\t\t"DesktopSetup" "horizontal"' ;; nv) # diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 44c3fe27..2cbc49cd 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -234,6 +234,7 @@ fi if [ -n "$noipyet" ] ; then waitfor /tmp/dhcp-done 20000 . /etc/machine-setup + [ -f /tmp/confviadhcp ] && . /tmp/confviadhcp [ -z "$clientip" -o -z "$subnet_mask" -o -z "$gateway" \ -o -z "$broadcast_address" ] && error "$init_errdhcp" ipsetup $clientip $subnet_mask $gateway $broadcast_address eth0 @@ -358,7 +359,7 @@ if [ -n "${UNIONFS}" ] ; then mkdir -p ${RWDIR}/union ${RWDIR}/uniontmp /rorootfs mount -n -t tmpfs none ${RWDIR}/uniontmp # hack for handling unionfs with patched run-init - mount --move /mnt /rorootfs + mount -n --move /mnt /rorootfs mount -n -t unionfs -o dirs=${RWDIR}/uniontmp=rw:/rorootfs=${NFSRO}ro \ none /mnt mkdir -p /mnt/uniontmp @@ -367,9 +368,8 @@ if [ -n "${UNIONFS}" ] ; then # probably more sources should be merged into union (${UNION} is defined) # allow more than one union?? if [ -n "${UNION}" ] ; then - # mkdir /unionadd - # for dir in ${UNIONDIRS}; do - # mkdir /unionadd/$dir + # for dir in "${UNION}"; do + # testmkd /unionadd/$dir # mount $dir unionadd/$dir # unionctl mnt --add --after /mnt --mode ro /unionadd/$dir # most probably it is a good idea to run ldconfig, so enable it diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 1f18fe0e..05325f13 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -444,6 +444,7 @@ if [ -n "$use_busybox" ] ; then umount uname usleep vconfig vi; do ln -s /bin/busybox ${INSTDIR}/bin/$bbins done + # fake the sh link in busybox environment echo -e "#!/bin/ash\n/bin/ash $@" > ${INSTDIR}/bin/sh chmod a+x ${INSTDIR}/bin/sh else -- cgit v1.2.3-55-g7522