# Description: configuration functions for SuSE 10.0 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. # # Author(s): Dirk von Suchodoletz , 24-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # # Version: 0.2.1f # postinit () { : } # udev service udev_hotplug () { local result=0 echo "Starting udev" udevstart || result=1 if [ -x /bin/udevd ] ; then export UDEVD_EXPECTED_SEQNUM=$(cat /sys/kernel/hotplug_seqnum) export UDEVD_EVENT_TIMEOUT=1 echo "" > /proc/sys/kernel/hotplug udevd --daemon || result=1 else error " udev daemon is not available. Some devices might not \ apprear." nonfatal fi return $result } # acpi and powersave have changed config_acpi () { rllinker acpid "10" "12" rllinker powersaved "11" "11" } # 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 } # prepare virtual machine environment (vmware, vmplayer) config_vmware () { rllinker "vmware-prep" "18" "02" rllinker "vmware" "20" "02" sed -e "s,TARGETS =,TARGETS = vmware-prep," \ /mnt/etc/${D_INITDIR}/.depend.start >> /etc/.depend.start 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 \ devices\n# during vmware sessions. If you like to remove certain modules \ add them\n# to the list below - Dirk von Suchodoletz, \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# Dirk von \ Suchodoletz, \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 }