diff options
author | Dirk von Suchodoletz | 2006-09-01 00:09:29 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-09-01 00:09:29 +0200 |
commit | e5d839ce84f18894bb002c941002e76c727bc16e (patch) | |
tree | ed070bc37c0df43ef813f9079cd341d6014c5c8f /initrd | |
parent | Fixing error in uri_token function (server was not read correctly), (diff) | |
download | core-e5d839ce84f18894bb002c941002e76c727bc16e.tar.gz core-e5d839ce84f18894bb002c941002e76c727bc16e.tar.xz core-e5d839ce84f18894bb002c941002e76c727bc16e.zip |
Cleanups, small bugfixes, ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@350 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/distro-specs/suse/functions-10.1 | 33 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 45 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 2 |
3 files changed, 37 insertions, 43 deletions
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1 index abf7c45c..7fb8a44a 100644 --- a/initrd/distro-specs/suse/functions-10.1 +++ b/initrd/distro-specs/suse/functions-10.1 @@ -1,13 +1,10 @@ -# Description: configuration functions for SuSE 10.1 which differ from -# functions defined in general SuSE base definitions ... -# General changes should be done there, version specific -# changes for the 10.1 here. +# configuration functions for SuSE 10.1 which differ from functions defined +# in general SuSE base definitions ... General changes should be done there, +# version specific changes for the 10.1 go here. # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 15-07-2006 +# Dirk von Suchodoletz <dvs@OpenSLX.com>, 31-08-2006 # -# Copyright: (c) 2006 - RZ Universitaet Freiburg -# -# Version: 0.3.0c +# (c) 2006 - RZ Universitaet Freiburg # some specific stuff to initialize preinit () { @@ -23,6 +20,7 @@ for i in idedma.sh mount.sh rename_netiface create_floppy_devices ; do echo -e "#!$shell\n:" >/lib/udev/$i done echo -e "#!$shell\n:" >/usr/sbin/alsactl +rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null chmod u+x /sbin/* /lib/udev/* /usr/sbin/* } @@ -59,22 +57,25 @@ sed -e "s,TARGETS =,TARGETS = vmware-prep," \ echo "vmware-prep: " >> /etc/.depend.start cp /etc/.depend.start /mnt/etc/${D_INITDIR}/.depend.start # during vmware sessions linux should not handle usb events/devices -testmkd /mnt/var/X11R6/bin -echo '#!/bin/sh'> /mnt/var/X11R6/bin/vm-udev -echo -e "# Script for blocking linux from handling usb \ +# vmplayer and recent versions of vmware do not need this hack +if [ ! -x /mnt/usr/bin/vmplayer ] ; then + testmkd /mnt/var/X11R6/bin + echo '#!/bin/sh'> /mnt/var/X11R6/bin/vm-udev + echo -e "# Script for blocking linux from handling usb \ devices\n# during vmware sessions. If you like to remove certain modules \ -add them\n# to the list below - Dirk von Suchodoletz, <dirk@goe.net>\n\ +add them\n# to the list below - Dirk von Suchodoletz, <dvs@OpenSLX.com>\n\ STATE=1\nps aux|grep -i vmware|grep -v \"grep\" &>/dev/null && { STATE=0; \ /sbin/rmmod usb-storage &>/tmp/null; }\n\ [ x\$ACTION = xremove ] && { [ \$STATE = 0 ] && /sbin/rmmod usb-storage \ &>/dev/null; }\nexit \$STATE" >> /mnt/var/X11R6/bin/vm-udev -chmod u+x /mnt/var/X11R6/bin/vm-udev -echo -e "# special entry to block linux from reacting to usb events during \ + chmod u+x /mnt/var/X11R6/bin/vm-udev + echo -e "# special entry to block linux from reacting to usb events during \ running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \ -Suchodoletz, <dirk@goe.net>\nSUBSYSTEM==\"usb\", ACTION==\"add\", \ +Suchodoletz, <dvs@OpenSLX.com>\nSUBSYSTEM==\"usb\", ACTION==\"add\", \ 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 + >> /mnt/etc/udev/rules.d/01-udev-vm.rules +fi } # set up keytable (function run in hwautocfg) diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 8c7e05c3..7ac87bb6 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -45,14 +45,15 @@ while [ $len -le 11 ] ; do len=$(expr $len + 1) done echo " - WELCOME TO \n (\l) - _____ ______ __ _____ - / _ | _ | | | _ | - | | | | | | | | | | | |_| | - | |_| | | |_| | | |___ | ___/ - _____/ |______/ |______| |__| - - Diskless Workstation (v4.1/$dstr (c) <OpenSLX.ORG> + WELCOME TO \n (\l) + _____ ______ ______ __ __ _______ __ __ __ + / _ | _ | ___| | | | | ____| | | | | | + | | | | |_| | |_ | | | | |___ | | / / + | | | | ___/| _| | | ____ | | | | + | |_| | | | |___| | | | ____| | |__ / / + _____/|__| |______|__| |__| |_______|_____|__| |__| + + Diskless Workstation (v4.1/$dstr (c) <OpenSLX.ORG> ">/mnt/etc/issue ####################################################################### @@ -221,11 +222,11 @@ config_bt # network(ed) services # network time service (ntp) configuration file -if [ -n "$ntp_servers" ]; then +if [ -n "$ntp_servers" -a ! -f /rootfs/etc/ntp.conf ]; then echo -e "# /etc/ntp.conf - file generated by $0: \ -$date\n" >/mnt/etc/ntp.conf; +$date\n" >/mnt/etc/ntp.conf for ntpserver in $ntp_servers; do - echo server $ntpserver >>/mnt/etc/ntp.conf; + echo server $ntpserver >>/mnt/etc/ntp.conf done fi # copy timezone file defined with language settings @@ -268,14 +269,6 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then /var/run/vmware /etc/X11/sessions ; do testmkd /mnt/$i done - # moved up within this file!! - # mount the vmware image source or link it (compatibility to ver. 3) - #if [ -d /mnt/usr/share/vmware ] ; then - # ln -sf /usr/share/vmware /var/lib/vmware - #elif [ -n "${imgsrv}" ] ; then - # # more general mount script should be used here!? - # ( nfsmnt ${imgsrv} /mnt/var/lib/vmware || error "$scfg_nfs" nonfatal ) #& - #fi # generate a runlevel script d_mkrlscript init vmware-prep "Starting preparation of vmware environment" sed "s,^#.*,,;/^$/d;s,^, ," /etc/vmware-prep >> \ @@ -289,10 +282,10 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then # add special sessions to the display managers session menu # check here that mount finished and the important files are available # default kdm session. Xdialog with WM and VMware images - cp /mnt/var/lib/vmware/templ/runvmware /mnt/var/X11R6/bin - chmod 755 /mnt/var/X11R6/bin/runvmware >/dev/null 2>&1 - cp /mnt/var/lib/vmware/templ/defaultwm /mnt/var/X11R6/bin - chmod 755 /mnt/var/X11R6/bin/defaultwm >/dev/null 2>&1 + cp /mnt/var/lib/vmware/templ/runvmware \ + /mnt/var/X11R6/bin >/dev/null 2>&1 + cp /mnt/var/lib/vmware/templ/defaultwm \ + /mnt/var/X11R6/bin >/dev/null 2>&1 fi config_vmware chmod 1777 /mnt/var/run/vmware @@ -309,7 +302,8 @@ Type=Application" >/mnt/etc/X11/sessions/default.desktop \nxterm -bg black -fg white -geometry 100x30+0-0 +sb \ -e \"/var/X11R6/bin/runvmware -s \${startvm}\"\n" \ > /mnt/var/X11R6/bin/desktop-session #${debug} removed - chmod 755 /mnt/var/X11R6/bin/desktop-session + chmod 755 /mnt/var/X11R6/bin/runvmware /mnt/var/X11R6/bin/defaultwm \ + /mnt/var/X11R6/bin/desktop-session >/dev/null 2>&1 sessions=$(ls /mnt/var/lib/vmware/vmsessions/*.desktop 2>/dev/null) # fixme: the following part is to be tested!! if [ -n "${sessions}" ]; then @@ -370,8 +364,7 @@ if [ "x$start_x" != "xno" ] ; then /var/run/xdmctl \ /tmp/.ICE-unix \ /tmp/.X11-unix ; do testmkd /mnt/$i; done - chmod a+rwxt /mnt/tmp/.ICE-unix - chmod a+rwxt /mnt/tmp/.X11-unix + chmod a+rwxt /mnt/tmp/.ICE-unix /mnt/tmp/.X11-unix 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 diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 7357b982..006ccb17 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -816,7 +816,7 @@ case "${XMODULE}" in # 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 && \ + && test -f /mnt/usr/X11R6/lib/modules/drivers/fglrx_drv.* && \ XMODULE=fglrx # there seems no problem, if no TV is connected TVOUT='\tOption\t\t"TVFormat" "PAL-B"\n |