diff options
| author | Dirk von Suchodoletz | 2006-05-20 00:45:22 +0200 |
|---|---|---|
| committer | Dirk von Suchodoletz | 2006-05-20 00:45:22 +0200 |
| commit | c0c45928ef64b9d3ebfe960242b624e197d6db3c (patch) | |
| tree | f79458df30cf906083a736801da5f7920c18707e /initrd | |
| parent | small bugfixes (diff) | |
| download | core-c0c45928ef64b9d3ebfe960242b624e197d6db3c.tar.gz core-c0c45928ef64b9d3ebfe960242b624e197d6db3c.tar.xz core-c0c45928ef64b9d3ebfe960242b624e197d6db3c.zip | |
kiosk mode enabled, cleanup in functions-10.1, ignore atiixp_modem
module ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@222 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
| -rw-r--r-- | initrd/distro-specs/suse/config-9.3 | 2 | ||||
| -rw-r--r-- | initrd/distro-specs/suse/functions-10.1 | 61 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 5 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 33 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/etc/startgui | 78 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/init | 6 |
6 files changed, 113 insertions, 72 deletions
diff --git a/initrd/distro-specs/suse/config-9.3 b/initrd/distro-specs/suse/config-9.3 index 954c71b9..0301b606 100644 --- a/initrd/distro-specs/suse/config-9.3 +++ b/initrd/distro-specs/suse/config-9.3 @@ -52,5 +52,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" +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 1eb49dfd..bc7b7037 100644 --- a/initrd/distro-specs/suse/functions-10.1 +++ b/initrd/distro-specs/suse/functions-10.1 @@ -1,9 +1,9 @@ # Description: configuration functions for SuSE 10.1 which differ from -# functions defined for SuSE 9.3 which is base ... General -# changes should be done there, version specific changes for -# the 10.0 here. +# functions defined for SuSE 9.3 and 10.0 which are base ... +# General changes should be done there, version specific +# changes for the 10.1 here. # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 02-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 20-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -26,7 +26,6 @@ postinit () { : } - # udev service udev_hotplug () { local result=0 @@ -45,55 +44,3 @@ fi return $result } -# acpi and powersave have changed -config_acpi () { -local start_acpi=10 -local stop_acpi=12 -local start_powersave=11 -local stop_powersave=11 -rllinker acpid "$start_acpi" "$stop_acpi" -rllinker powersaved "$start_powersave" "$stop_powersave" -} - -# configure dbus (inter application communication for kde and gnome), hal -# (hardware abstraction layer - used e.g. by powersaved) and resmgr -# (resource manager - the user gets permissions to devices when loggin on) -# runlevel script for haldaemon is now haldaemon instead of hal -config_dreshal () { -local start="05" -local stop="18" -if [ "x$start_dreshal" = "xyes" ]; then - if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then - strinfile "messagebus:" /mnt/etc/passwd || \ - echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ - >> /mnt/etc/passwd - strinfile "messagebus:" /mnt/etc/group || \ - echo "messagebus:!:101:" >> /mnt/etc/group - testmkd /mnt/var/run/dbus - # set permissions with userid - echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - rllinker "dbus" "$start" "$stop" - fi - if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then - testmkd /mnt/var/run/resmgr/classes - start="0"`expr $start + 1` - stop="0"`expr $start - 1` - rllinker "resmgr" "$start" "$stop" - fi - if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then - strinfile "haldaemon:" /mnt/etc/passwd || \ - echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ - >> /mnt/etc/passwd - strinfile "haldaemon:" /mnt/etc/group || \ - echo "haldaemon:!:103:" >> /mnt/etc/group - testmkd /mnt/var/run/hal - # set permissions with userid - echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - start="0"`expr $start + 1` - stop="0"`expr $start - 1` - rllinker "haldaemon" "$start" "$stop" - fi -fi -} diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 14e40345..11d22f21 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -298,7 +298,6 @@ waitfor /tmp/hwrun1 50000 || \ error " Expected information from hwsetup to appear in \ /tmp/hwsetup.info.\n Unable to configure parts of the systems hardware. \ Please check that\n hwsetup is properly installed and executable." - # load ide drivers first, takes a while to initialize for DRIVER in cmd64x hpt366 piix slc90e66 cs5520 it821x rz1000 \ triflex aec62xx cs5530 ns87415 sc1200 trm290 alim15x3 \ @@ -341,6 +340,10 @@ if [ -f /etc/sysconfig/sound ] ; then . /etc/sysconfig/sound else DRIVER="snd-dummy" fi +# special hack +#if [ "${DRIVER}" = "snd-atiixp" ] ; then +# rmmod snd_atiixp_modem snd_atiixp +#fi modprobe ${MODPRV} ${DRIVER} DRIVERLIST="${DRIVERLIST} ${DRIVER} " diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 10963822..ba203eb8 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>, 18-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 19-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -36,15 +36,21 @@ cp -a /etc/sysconfig/files/* /mnt 2>/dev/null & } # set greeting +len=$(expr length $DISTRO) +dstr="$DISTRO)" +while [ $len -le 8 ] ; do + dstr="$dstr " + len=$(expr $len + 1) +done echo " - WELCOME TO \n (\l) + WELCOME TO \n (\l) __ __ ___ __ __ __ __ __ __ | | | || | || | | || |_| | | | | | | || || | | | / |__| | |___ | || | || |_| | / _ __ |______||__||__| |__| _____/ |__| |__| |__| - Diskless Workstation (v4.0) (c) <dirk@goe.net> + Diskless Workstation (v4.0/$dstr (c) <dirk@goe.net> ">/mnt/etc/issue ####################################################################### @@ -319,7 +325,7 @@ if [ "x$start_x" != "xno" ] ; then /tmp/.X11-unix ; do testmkd /mnt/$i; done chmod a+rwxt /mnt/tmp/.ICE-unix chmod a+rwxt /mnt/tmp/.X11-unix - echo "" > /mnt/etc/X11/xdm/Xservers + echo "# file emtied by $0 during initramfs" > /mnt/etc/X11/xdm/Xservers # define additional sessions offered to the user (via dhcp/ldap config) # descsession -> deprecated by new vmware integration concept # write available X display manager to /etc/X11/xdm/Xaccess @@ -358,18 +364,25 @@ $0: $date\n:0 local /usr/X11R6/bin/X :0 vt07\n" >/mnt/etc/X11/xdm/Xservers xdmcp="true" ;; *) - # fixme!! not optimal for fast start # no display manager needed in kiosk mode # in this mode you have to provide the type of X session to start [ x$start_xdmcp != "x" ] || start_xdmcp="no"; - init="#7:5:respawn:/var/X11R6/bin/kiosk /dev/tty7" + init="7:5:respawn:/var/X11R6/bin/kiosk /dev/tty7" echo -e "#!/bin/sh\n# /var/X11R6/bin/kiosk - file generated by $0: \ -$date\nresmgr login nobody tty7\nresmgr grant nobody desktop\n\ -chown nobody /dev/dsp*\n\ -su -c 'xinit /etc/init.d/startgui $start_x -- vt7 -quiet' -l nobody &>/dev/null\n\ +$date\nwhile ps aux|grep -i kiosk|grep -v \"grep\" &>/dev/null ; do\n \ +sleep 3; test -f /tmp/kiosk || break; done\n\ +touch /tmp/kiosk +resmgr login nobody tty7\nresmgr grant nobody desktop\nchown nobody \ +/dev/dsp* /dev/audio* /dev/mixer*\nsu -c 'xinit /var/X11R6/bin/startgui \ +$start_x -- vt7 -quiet' -l nobody &>/dev/null\nrm /tmp/kiosk\n\ resmgr revoke nobody\nresmgr logout tty7\nkillall X\nsleep 2" \ >/mnt/var/X11R6/bin/kiosk - chmod a+x /mnt/var/X11R6/bin/kiosk & + # early start + echo -e "\t# kiosk start added by $0\n\tsleep 4; \ +/var/X11R6/bin/kiosk &>/dev/null &" >>/mnt/etc/${D_INITDIR}/boot.ld + cp /etc/startgui /mnt/var/X11R6/bin + chmod a+x /mnt/var/X11R6/bin/kiosk /mnt/var/X11R6/bin/startgui + rm /mnt/tmp/kiosk 2>/dev/null ;; esac # enable runlevel 5 (X11 gui under SuSE linux) diff --git a/initrd/initrd-stuff/etc/startgui b/initrd/initrd-stuff/etc/startgui new file mode 100755 index 00000000..e2e97721 --- /dev/null +++ b/initrd/initrd-stuff/etc/startgui @@ -0,0 +1,78 @@ +#!/bin/sh +# +# Description: startgui runs as script replacement for xinit +# +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 19-05-2006 +# Michael Janczyk, 26-08-2005 +# Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg +# +# Version: 0.1.0b +# +# /var/X11R6/bin/startgui +# +########################################################################### + +# functions +error () { + $2 $1 +} + +sysresources=/usr/X11R6/lib/X11/Xresources +sysmodmap=/usr/X11R6/lib/X11/Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +WM=$1 +[ $WM ] || WM=kde +case "$WM" in + *fvwm*) + fvwm2 + ;; + *kde*) + mkdir ~/.kde &>/dev/null + cp -a /usr/share/dxs/WMsettings/kde ~/.kde + /opt/kde3/bin/startkde + ;; + *wmaker*|*windowmaker*) + mkdir ~/GNUstep &>/dev/null + cp -a /usr/share/dxs/WMsettings/windowmaker ~/GNUstep + wmaker + ;; + *ice*) + icewm + ;; + *gnome*) + cp -a /usr/share/dxs/WMsettings/gnome/.* ~/ + gnome + ;; + *citrix|Citrix|ICAClient|*wfica) + xsetroot -solid black + cp -a /etc/dxs/ICAClient/ ~/.ICAClient + wfica + ;; + *citrix-mgr|*citrix-indirect|*wfcmgr) + xsetroot -solid black + cp -a /etc/dxs/ICAClient/ ~/.ICAClient + # + ;; + *vmware*) + xsetroot -solid black + mkdir -p $HOME/.vmware &>/dev/null + xterm -bg black -fg white -geometry 170x30+0-0 +sb -e \ + "runvmware -i --debug 1" + ;; + *) + if which $WM; then + $WM + error "Session ended ... Click OK to restart X" xmessage + else + error "Tried: $WM - Kein sinnvoller wm angegeb." xmessage + xterm + fi + ;; +esac +exit 0 diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 874792f7..a069f61d 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -2,7 +2,7 @@ # Description: main script for new type of initial ramdisk for # linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 10-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 19-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -423,13 +423,13 @@ echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\ Suchodoletz, dirk@goe.net\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\ proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\ \t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0\n\ -usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0" >>/mnt/etc/fstab || \ +usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0" >/mnt/etc/fstab || \ error "$init_fstab" echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\ 0 0" > /mnt/etc/mtab [ -z "$UNIONFS" ] && echo -e "ramfs /tmp tmpfs rw 0 0\nramfs /root\ tmpfs rw 0 0\nramfs /media tmpfs rw 0 0 \nramfs /home tmpfs rw 0 0" \ - > /mnt/etc/mtab + >> /mnt/etc/mtab # copy library cache if generated if [ -z "${NOLDSC}" ] ; then |
