summaryrefslogtreecommitdiffstats
path: root/initrd/distro-specs/suse/functions-10.1
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/distro-specs/suse/functions-10.1')
-rw-r--r--initrd/distro-specs/suse/functions-10.133
1 files changed, 17 insertions, 16 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)