diff options
Diffstat (limited to 'initrd')
| -rw-r--r-- | initrd/distro-specs/suse/functions-10.0 | 27 | ||||
| -rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 14 | ||||
| -rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 8 | ||||
| -rw-r--r-- | initrd/initrd-stuff/etc/vmware-prep | 18 |
4 files changed, 56 insertions, 11 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 ;; diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 4f96dc24..c5bbf4dc 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -2,13 +2,13 @@ # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 19-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-04-2006 # Nico Dietrich # Felix Endres # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1f +# Version: 0.2.1g # distro specific stuff to initialize preinit () { @@ -212,7 +212,9 @@ local info="$3" case "$switch" in init) echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name written \ -from $0" >/mnt/etc/${D_INITDIR}/$name +from $0\n# after you applied changes to the creation scripts you have to \ +rerun\n# the mkdxsinitrd script to get them applied" \ + >/mnt/etc/${D_INITDIR}/$name echo -e "\n\ncase \"\$1\" in\n start)\techo -n \"$info\"" \ >>/mnt/etc/${D_INITDIR}/$name chmod u+x /mnt/etc/${D_INITDIR}/$name diff --git a/initrd/initrd-stuff/etc/vmware-prep b/initrd/initrd-stuff/etc/vmware-prep index a8da6ad9..d3a377ee 100644 --- a/initrd/initrd-stuff/etc/vmware-prep +++ b/initrd/initrd-stuff/etc/vmware-prep @@ -6,10 +6,10 @@ # initial ramdisk # # Author(s): Michael Janczyk <mj0@uni-freiburg.de>, 04-04-2006 -# Dirk von Suchodoletz <dirk@goe.net>, 25-03-2006 +# Dirk von Suchodoletz <dirk@goe.net>, 28-04-2006 # Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg # -# Version: 0.1b +# Version: 0.2a ################################################################################ @@ -101,7 +101,19 @@ vmsession2desktop_session () { fi } - +# no-usb-rule as udev vmware rule +vm_udev () { +echo -e "#!/bin/sh\n# script for blocking linux usb action during vmware \ +sessions\n# written from $0 script during runlevel\n# add any usb modules \ +here, which you would like to disable in linux for \n# getting them in \ +vmware guest os\n# Dirk von Suchodoletz <dirk@goe.net>\nRETURN=1\n\ +ps aux |grep -i vmware| grep -v "grep" &>/dev/null && {\n RET=0\n \ +rmmod usb-storage & >/dev/null\n}\nexit $RET" > /var/X11R6/bin/vm-udev +chmod u+x /var/X11R6/bin/vm-udev +echo -e '# special rule for ignoring usb events during vmware sessions\n\ +BUS=="usb", ACTION=="add", PROGRAM="/var/X11R6/bin/vm-udev", \ +OPTIONS="ignore_device"' > /etc/udev/rules/01-udev-vm.rules +} ### START SCRIPT ############################################################### |
