# Copyright (c) 2003 - 2006 - RZ Uni Freiburg # Copyright (c) 2006, 2007 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING # # If you have any feedback please consult http://openslx.org/feedback and # send your feedback to feedback@openslx.org # # General information about OpenSLX can be found under http://openslx.org # # Configuration functions for SuSE 10.0 which differ from functions defined # in general SuSE base definitions ... General changes should be done there, # version specific changes for the version 10.0 go here. # prepare virtual machine environment (vmware, vmplayer) config_vmware () { rllinker "vmware" 20 2 # 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 \ devices\n# during vmware sessions. If you like to remove certain modules add \ them\n# to the list below - OpenSLX.ORG Project, \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 \ running\n# vmware sessions, generated by $0 during initramfs\n# OpenSLX \ Project, \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 } # secure shell service config_sshd () { if [ "x$start_sshd" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then testmkd /mnt/var/lib/sshd testmkd /mnt/var/lib/empty if ! strinfile "sshd:" /mnt/etc/passwd ; then echo -e "sshd:x:71:65::/var/run/sshd:/bin/false" \ >>/mnt/etc/passwd echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow fi rllinker "sshd" 25 10 else error "$df_errsshd" nonfatal fi fi } # Xorg variable settings. Lots of stuff changes for newer Xorg servers displayvars () { synapticsdrv="/usr/X11R6/lib/modules/input/synaptics_drv.o" }