summaryrefslogtreecommitdiffstats
path: root/initrd/distro-specs/suse
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-04-28 01:17:37 +0200
committerDirk von Suchodoletz2006-04-28 01:17:37 +0200
commit817ee0396bc5e46434b6df2b10155f352f43c132 (patch)
treeb193957d61beb437f1e074242c1b5db0949dd0e8 /initrd/distro-specs/suse
parentManpage for the installer (diff)
downloadcore-817ee0396bc5e46434b6df2b10155f352f43c132.tar.gz
core-817ee0396bc5e46434b6df2b10155f352f43c132.tar.xz
core-817ee0396bc5e46434b6df2b10155f352f43c132.zip
hopefully solved vmware/usb issue for SuSE9.3,10.0,10.1 (linux should
not load any modules during VMware sessions) git-svn-id: http://svn.openslx.org/svn/openslx/ld4@201 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/distro-specs/suse')
-rw-r--r--initrd/distro-specs/suse/functions-10.027
-rw-r--r--initrd/distro-specs/suse/functions-9.314
2 files changed, 36 insertions, 5 deletions
diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0
index 074f730f..6e30b9de 100644
--- a/initrd/distro-specs/suse/functions-10.0
+++ b/initrd/distro-specs/suse/functions-10.0
@@ -3,13 +3,13 @@
# changes should be done there, version specific changes for
# the 10.0 here.
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 16-02-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-04-2006
# Blabla
# Blub
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1c
+# Version: 0.2.1d
#
postinit () {
@@ -84,3 +84,26 @@ if [ "x$start_dreshal" = "xyes" ]; then
fi
fi
}
+# start vmware
+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 -e "#!/bin/sh\n# 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\
+RET=1\nps aux |grep -i vmware| grep -v \"grep\" &>/dev/null && {\n \
+RET=0\n rmmod usb-storage & >/dev/null\n}\nexit \$RET\n}" > \
+ /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, <dirk@goe.net>\nBUS==\"usb\", ACTION==\"add\", \
+PROGRAM=\"/var/X11R6/bin/vm-udev\", OPTIONS=\"ignore_device\"" \
+ > /mnt/etc/udev/rules.d/01-udev-vm.rules
+}
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 6c18677c..79309827 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -4,11 +4,11 @@
# functions file). This file is the main base for the
# following SuSE distributions
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 19-04-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-04-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.2c
+# Version: 0.2.2e
# distro specific stuff to initialize
preinit () {
@@ -431,6 +431,12 @@ 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
+# this line should be added to /etc/hotplug.d/usb/50-usb.hotplug
+# to block linux from handling usb events during vmware sessions
+sed -e '/USB-specific/{;i\' \
+ -e 'ps aux |grep -i vmware| grep -v "grep" &>/dev/null && exit 0' \
+ -e ' }' /mnt/etc/hotplug.d/usb/50-usb.hotplug > /tmp/50-usb.hotplug
+cp /tmp/50-usb.hotplug /mnt/etc/hotplug.d/usb/50-usb.hotplug
}
# initialize runlevel skript to be executed during system startup
@@ -443,7 +449,9 @@ local info="$3"
case "$1" in
init)
echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name created \
-by $0\n. /etc/rc.status\n. /etc/${D_SYSCONFDIR}/logfile\nrc_reset\ncase \
+by $0\n# after you applied changes to the creation scripts you have to \
+rerun\n# the mkdxsinitrd script to get them applied\n\
+. /etc/rc.status\n. /etc/${D_SYSCONFDIR}/logfile\nrc_reset\ncase \
\"\$1\" in\n start)\n\techo -n \"$info\"" >>/mnt/etc/${D_INITDIR}/$name
chmod u+x /mnt/etc/${D_INITDIR}/$name
;;