diff options
author | Dirk von Suchodoletz | 2006-07-09 16:28:54 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-07-09 16:28:54 +0200 |
commit | 91cd8bbd21cc205c8d113a3740e498f6bb780492 (patch) | |
tree | ec8cd67ecde3901a06645b2b9660769a97e66bab /initrd | |
parent | Added detection of i945G graphics adaptor. Local changes should go to (diff) | |
download | core-91cd8bbd21cc205c8d113a3740e498f6bb780492.tar.gz core-91cd8bbd21cc205c8d113a3740e498f6bb780492.tar.xz core-91cd8bbd21cc205c8d113a3740e498f6bb780492.zip |
Fix for certain keyboard (inactivity) problem, introduction of keytable
setup function ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@279 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/distro-specs/suse/functions-default | 35 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-6.06 | 6 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-default | 8 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 33 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 10 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 7 |
6 files changed, 68 insertions, 31 deletions
diff --git a/initrd/distro-specs/suse/functions-default b/initrd/distro-specs/suse/functions-default index df284978..d3cd5dc2 100644 --- a/initrd/distro-specs/suse/functions-default +++ b/initrd/distro-specs/suse/functions-default @@ -144,13 +144,18 @@ local dm="$1" sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ -e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dm\"," \ -i /mnt/etc/${D_SYSCONFDIR}/displaymanager -# start the display manager as early as possible, but avoid that is -# started twice during bootup - quickhack ... -#ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm -ln -sf ../xdm /mnt/etc/${D_INITDIR}/rc5.d/K20xdm -echo -e "\tsleep 2; /etc/${D_INITDIR}/xdm start >${LOGFILE} 2>&1\n\ -\t( sleep 120; ln -sf ../xdm /etc/${D_INITDIR}/rc5.d/S01xdm \ ->${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld +# start the display manager as early as possible, but avoid that it is +# started twice during bootup ... late_dm can postpone the start of +# displaymanager and X if problems with keyboard, console occur ... +if [ "x$late_dm" = "xyes" ] ; then + ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm + ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K18xdm + sed -e "s,xdm: .*,xdm:," -i /mnt/etc/${D_INITDIR}/.depend.start +else + ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITBOOTD}/S02xdm + echo -e "\t(sleep 60; ln -sf ../xdm /etc/${D_INITDIR}/rc5.d/S01xdm; \ + rm /etc/${D_INITBOOTD}/S02xdm) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld +fi } # configure X display manager (runlevel links and kind of manager) @@ -207,7 +212,7 @@ $vmsessions BaseXsession=/etc/opt/gnome/gdm/Xsession UserAuthFBDir=/tmp UserAuthFile=.Xauthority -StandardXServer=/usr/X11R6/bin/X +StandardXServer=/usr/X11R6/bin/X +kb -I Xnest=/usr/X11R6/bin/Xnest -audit 0 -name Xnest [security] @@ -341,7 +346,19 @@ sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \ cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth } -# consolefont and language +# set up keytable (function run in hwautocfg) +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 +} + +# consolefont and language (function run in hwautocfg) consolefont () { echo -e "\tsetfont ${CONSOLE_FONT} >${LOGFILE} 2>&1\n" \ >>/mnt/etc/${D_INITDIR}/boot.ld diff --git a/initrd/distro-specs/ubuntu/functions-6.06 b/initrd/distro-specs/ubuntu/functions-6.06 index 8a6465dc..7ca485fe 100644 --- a/initrd/distro-specs/ubuntu/functions-6.06 +++ b/initrd/distro-specs/ubuntu/functions-6.06 @@ -138,9 +138,15 @@ done #PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/profile } +# set up keytable (function run in hwautocfg) +keytable () { +# fixme -- use keytable setup script here +: +} # consolefont and language consolefont () { +# better change that in /etc/functions to UTF8 default if [ "$LANG" == "de_DE@euro" ] ; then LANG=de_DE.UTF8 fi diff --git a/initrd/distro-specs/ubuntu/functions-default b/initrd/distro-specs/ubuntu/functions-default index 75a94176..2def5937 100644 --- a/initrd/distro-specs/ubuntu/functions-default +++ b/initrd/distro-specs/ubuntu/functions-default @@ -174,11 +174,19 @@ if [ "x$start_snmp" = "xyes" ] ; then fi } +# set up keytable (function run in hwautocfg) +keytable () { +# fixme -- use keytable setup script here +: +} + # consolefont consolefont () { echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \ >>/mnt/etc/${D_INITDIR}/boot.ld } + + # acpi and powersave config_acpi () { rllinker "acpid" "10" "19" diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 8992a947..7a592917 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -4,13 +4,13 @@ # script for linux diskless clients, using hwconfig from # knoppix as base tool # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-07-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006 # Felix Endres # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg # (c) 2006 - odlx.org project # -# Version: 0.3.2b +# Version: 0.3.2c # local functions used within hwautocfg displaysetup () { @@ -175,6 +175,8 @@ for section in Files ServerFlags Module InputDevice Monitor \ [ $DEBUGLEVEL -gt 1 ] && msg "X setup" \ "adding for some Xfree86 modules (radeon, s3virge, nvidia) special\noptions \ to the 'Device' section. Consult hwsetup if you like to add more or\nremove some." + # write TV config - no problem, if no TV is connected + [ -n "$TVOUT" ] && echo -e $TVOUT >>$xfc [ x$DRV = "xs3virge" ] && { echo -e "\tOption\t\t\"XVideo\" \"Off\"\n" >>$xfc [ $DEBUGLEVEL -gt 1 ] && msg "X setup" \ @@ -408,8 +410,6 @@ fi cfgcomplete . /etc/machine-setup -# postpone some commands into normal bootup environment -echo -e "\t# entries added by $0: $date" >> /etc/boot.ld # run localizator and configure keyboard and console fonts DEFKEYTABLE="de-latin1-nodeadkeys" localization $country @@ -418,20 +418,11 @@ if [ -z "${KEYTABLE}" ] ; then '${DEFKEYTABLE}' defined\nin $0." KEYTABLE=${DEFKEYTABLE} fi -# keytable will be loaded during early init process -echo -e "\tloadkeys -q ${KEYTABLE}" >> /etc/boot.ld # run X11 / Xorg configurator . /etc/sysconfig/xserver >/dev/null 2>&1 || error "$hcfg_hwsetup" nonfatal ( displaysetup /etc/xorg.conf; echo "ready" > /tmp/xready ) & -# wait for completion of clients root filesystem in /mnt -waitfor /tmp/fscmpl 40000 - -# add entries to boot.ld -cat /etc/boot.ld >> /mnt/etc/${D_INITDIR}/boot.ld -[ -n "${CONSOLE_FONT}" ] && consolefont - # get idea of availabe harddisk partitions, put swap partitions into # (/mnt)/etc/fstab and format and mount partitions of type 44 (unknown) for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ @@ -439,7 +430,7 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ fdisk -l /dev/$hd| sed -n "/^\/dev\//p" > /tmp/hd_part for hdpartnr in $(cat /tmp/hd_part | \ sed -n -e "/ 82 /p"|sed -e "s/[[:space:]].*//") ; do - echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t 0 0" >> /mnt/etc/fstab + echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t 0 0" >> /tmp/fstab done # we use special non assigned partition type for harddisk scratch space for hdpartnr in $(cat /tmp/hd_part | \ @@ -447,7 +438,7 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ # ugly message from ext2 mount :-( ( mkfs.ext2 -q $hdpartnr; mount -n $hdpartnr /mnt/tmp; \ echo "$hdpartnr" > /tmp/tmpready ) & - echo -e "$hdpartnr\t/tmp\t\text2\t\tdefaults\t 0 0" >> /mnt/etc/fstab + echo -e "$hdpartnr\t/tmp\t\text2\t\tdefaults\t 0 0" >> /tmp/fstab part44=yes break done @@ -456,12 +447,22 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ sed -n -e "/ 83 /p"|sed -e "s/[[:space:]].*//") ; do mkdir -p /mnt/media/${hdpartnr#/dev/*} 2>/dev/null echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\ -noexec\t 0 0" >> /mnt/etc/fstab +noexec\t 0 0" >> /tmp/fstab done done # determine if tmp preparation should wait for format/mount or not [ -z "$part44" ] && echo "finished" > /tmp/tmpready +# wait for completion of clients root filesystem in /mnt +waitfor /tmp/fscmpl 40000 +cat /tmp/fstab >> /mnt/etc/fstab + +# add entries to initialize keytable and consolefont to boot.ld +# postpone some commands into normal bootup environment +echo -e "\t# entries added by $0: $date" >> /mnt/etc/${D_INITDIR}/boot.ld +[ -n "${KEYTABLE}" ] && keytable +[ -n "${CONSOLE_FONT}" ] && consolefont + # finalize X configuration # only if X is link itself (normally to /var/X11R6/bin/X) check!! link=`ls -l /mnt/usr/X11R6/bin/X 2>/dev/null` diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 44f8be90..b6d5aedb 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>, 03-07-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-07-2006 # Michael Janczyk, 31-05-2006 # Lars Mueller, 23-06-2006 # Oliver Tappe, 23-06-2006 @@ -394,7 +394,7 @@ $0: $date\n:0 local /usr/X11R6/bin/X :0 vt07\n" >/mnt/etc/X11/xdm/Xservers [ x$start_xdmcp != "x" ] || start_xdmcp="no"; init="7:5:respawn:/var/X11R6/bin/kiosk /dev/tty7" echo -e "#!/bin/sh\n# /var/X11R6/bin/kiosk - file generated by $0: \ -$date\nsleep 3; while ps aux|grep -i kiosk|grep -v \"grep\" &>/dev/null;\ +$date\nwhile ps aux|grep -i kiosk|grep -v \"grep\" &>/dev/null;\ do\n test -f /var/run/kiosk || break; sleep 3;\ndone\ntouch \ /var/run/kiosk\nresmgr login nobody tty7\nresmgr grant nobody desktop\n\ chown nobody /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/control*\n\ @@ -403,9 +403,11 @@ chown -R nobody.nobody /var/lib/nobody\nsu -c 'xinit /var/X11R6/bin/startgui \ $start_x -- vt7 -quiet' -l nobody &>/dev/null\nrm /var/run/kiosk\n\ resmgr revoke nobody\nresmgr logout tty7\nkillall X" \ >/mnt/var/X11R6/bin/kiosk - # early start of kiosk session - echo -e "\t# kiosk start added by $0\n\t\ + # early start of kiosk session if not late_dm is set + if [ "x$late_dm" != "xyes" ] ; then + echo -e "\t# kiosk start added by $0\n\t\ /var/X11R6/bin/kiosk &>/dev/null &" >>/mnt/etc/${D_INITDIR}/boot.ld + fi cp /etc/startgui /mnt/var/X11R6/bin chmod a+x /mnt/var/X11R6/bin/kiosk /mnt/var/X11R6/bin/startgui rm /mnt/var/run/kiosk 2>/dev/null diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index ab9365d2..0f07189f 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -455,11 +455,11 @@ case "$country" in # German version de*) COUNTRY="de" - LANG="de_DE@euro" + LANG="de_DE.UTF8" KEYTABLE="de-latin1-nodeadkeys" XKEYBOARD="de" KDEKEYBOARD="de" - CHARSET="iso8859-15" + CHARSET="utf8" KDEKEYBOARDS="us,fr" TZ="Europe/Berlin" ;; @@ -752,6 +752,9 @@ case "${XMODULE}" in 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"TVFormat" "PAL-B"\n +\tOption\t"DesktopSetup" "horizontal"' ;; nv) # |