diff options
author | Volker Uhrig | 2008-02-21 18:45:35 +0100 |
---|---|---|
committer | Volker Uhrig | 2008-02-21 18:45:35 +0100 |
commit | 0b3bf8fa3a6a5df08658aaaa3e7585a0e8b24302 (patch) | |
tree | d6fd43034bace8d5796d46bdf853c01eb6da48e0 /initramfs | |
parent | Added example of os-name in example.pm (diff) | |
download | core-0b3bf8fa3a6a5df08658aaaa3e7585a0e8b24302.tar.gz core-0b3bf8fa3a6a5df08658aaaa3e7585a0e8b24302.tar.xz core-0b3bf8fa3a6a5df08658aaaa3e7585a0e8b24302.zip |
* Removed deprecated vmware configuration
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1567 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/debian/functions-default | 60 | ||||
-rw-r--r-- | initramfs/distro-specs/gentoo/functions-default | 20 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.0 | 19 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.1 | 23 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.2 | 23 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-5.10 | 24 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-6.06 | 36 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-6.10 | 50 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-default | 12 |
9 files changed, 1 insertions, 266 deletions
diff --git a/initramfs/distro-specs/debian/functions-default b/initramfs/distro-specs/debian/functions-default index 742153df..e26faa0f 100644 --- a/initramfs/distro-specs/debian/functions-default +++ b/initramfs/distro-specs/debian/functions-default @@ -152,42 +152,6 @@ else windowmanagers="kde,gnome,icewm,failsafe" fi -# write script for desktop-session chooser (see in suse/functions*) -if [ "x$vmware" != "xno" ] ; then - debug="" - [ ${DEBUGLEVEL} -gt 0 ] && debug="--debug 1" - echo -e "#!/bin/sh\n#\n# file generated by\n#\t$0:\n#\t$date\n -OSTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$1}'\` -SPECTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$2}'\`\n -OPTS=\"-o \$OSTYPE \${SPECTYPE:+\"-s \$SPECTYPE\"}\"\n -xterm -bg black -fg white -geometry 170x30+0-0 +sb \ --e \"runvmware \$OPTS $debug\"\n" > /mnt/var/X11R6/bin/desktop-session - chmod a+x /mnt/var/X11R6/bin/desktop-session - addpath="true"; -fi -# check if /usr/X11R6/bin is writeable, else use /var/X11R6/bin -if [ -w /mnt/usr/X11R6/bin/WM-Session ] ; then - sesspath="/usr/X11R6/bin" -else - sesspath="/var/X11R6/bin" - addpath="true" -fi - -# create links to desktop-session chooser -[ -f /mnt/usr/bin/X11/wmlist ] && wmlist=`cat /mnt/usr/bin/X11/wmlist` - -for i in `echo $windowmanagers|sed -e "s/,/ /g"` ; do - # beware!! quickhack for VMware sessions - strinstr "$i" "$wmlist" || \ - test -x /mnt/usr/X11R6/bin/$i || \ - echo -e "[Desktop Entry]\nX-SuSE-translate=true\nEncoding=UTF-8\n\ -Type=XSession\nExec=$i\nTryExec=$sesspath/$i\n\ -Name=$i\n" > /mnt/etc/X11/sessions/$i.desktop - # does not work correctly (add /var/X11R6/bin to path!!) - test -x /mnt/usr/X11R6/bin/$i || \ - ln -fs /var/X11R6/bin/desktop-session /mnt/$sesspath/$i -done - # add special path /var/X11R6/bin to the PATH variable # fixme!! add path directly to /etc/profile!? #[ "x$addpath" != "x" ] && \ @@ -243,30 +207,6 @@ if [ "x$start_dreshal" = "xyes" ]; then fi } - -# fixme!! taken from SuSE10.0 untested here ... -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -rllinker "vmware" "24" "02" -# during vmware sessions linux should not handle usb events/devices -testmkd /mnt/var/X11R6/bin -echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules -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\ -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, <dirk@goe.net>\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 -} - # overwrite settings set by hwautocfg, pathes will change for newer # Xorg version 7.X displayvars (){ diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default index db3151d9..a9da16fe 100644 --- a/initramfs/distro-specs/gentoo/functions-default +++ b/initramfs/distro-specs/gentoo/functions-default @@ -437,26 +437,6 @@ config_nis () { rllinker "ypbind" } -# start vmware and vmware preparation services -config_vmware () { -# during vmware sessions linux should not handle usb events/devices -echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules -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\ -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, <dirk@goe.net>\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 -} - # Xorg variable settings. Lots of stuff changed for newer Xorg servers displayvars () { Files='\tModulePath\t"/etc/X11/modules"\n diff --git a/initramfs/distro-specs/suse/functions-10.0 b/initramfs/distro-specs/suse/functions-10.0 index aee86941..5f7916d1 100644 --- a/initramfs/distro-specs/suse/functions-10.0 +++ b/initramfs/distro-specs/suse/functions-10.0 @@ -13,25 +13,6 @@ # 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 () { -# during vmware sessions linux should not handle usb events/devices -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, <openslx-users@openslx.org>\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, <openslx-users@openslx.org>\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 diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1 index 5e1ee818..31ca9328 100644 --- a/initramfs/distro-specs/suse/functions-10.1 +++ b/initramfs/distro-specs/suse/functions-10.1 @@ -36,29 +36,6 @@ if [ "x$start_afs" = "xyes" ] ; then fi } -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -# during vmware sessions linux should not handle usb events/devices -# vmplayer and recent versions of vmware do not need this hack -if [ ! -x /mnt/usr/bin/vmplayer ] ; then - 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, <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 \ -running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \ -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 -fi -} - # set up keytable (function run in hwautocfg) # kbd runlevel link is in the list of initial runlevel scripts (see # config-10.1 file) diff --git a/initramfs/distro-specs/suse/functions-10.2 b/initramfs/distro-specs/suse/functions-10.2 index eb2ffe82..e9e7258f 100644 --- a/initramfs/distro-specs/suse/functions-10.2 +++ b/initramfs/distro-specs/suse/functions-10.2 @@ -88,28 +88,7 @@ echo -e "\t# stuff needed for nfsv4\n\tmount -t rpc_pipefs rpc_pipefs \ rllinker "gssd" 15 7 fi } -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -# during vmware sessions linux should not handle usb events/devices -# vmplayer and recent versions of vmware do not need this hack -if [ ! -x /mnt/usr/bin/vmplayer ] ; then - 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, <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 \ -running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \ -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 -fi -} + # set up keytable (function run in hwautocfg) keytable () { if [ -f /mnt/etc/${D_INITDIR}/kbd ] ; then diff --git a/initramfs/distro-specs/ubuntu/functions-5.10 b/initramfs/distro-specs/ubuntu/functions-5.10 index a7ad5db0..70b8fb1e 100644 --- a/initramfs/distro-specs/ubuntu/functions-5.10 +++ b/initramfs/distro-specs/ubuntu/functions-5.10 @@ -70,27 +70,3 @@ if [ "x$start_dreshal" = "xyes" ]; then : fi } - - -# fixme!! taken from SuSE10.0 untested here ... -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -rllinker "vmware" "20" "02" -# during vmware sessions linux should not handle usb events/devices -testmkd /mnt/var/X11R6/bin -echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules -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, <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 \ -running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \ -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 -} diff --git a/initramfs/distro-specs/ubuntu/functions-6.06 b/initramfs/distro-specs/ubuntu/functions-6.06 index 163e5f56..a8dc3b56 100644 --- a/initramfs/distro-specs/ubuntu/functions-6.06 +++ b/initramfs/distro-specs/ubuntu/functions-6.06 @@ -33,42 +33,6 @@ if [ "x$desktop_session" != "x" ] ; then else windowmanagers="kde,gnome,icewm,failsafe" fi -# write script for desktop-session chooser -if [ "x$vmware" != "xno" ] ; then - debug="" - [ ${DEBUGLEVEL} -gt 0 ] && debug="--debug 1" - echo -e "#!/bin/sh\n#\n# file generated by\n#\t$0:\n#\t$date\n -OSTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$1}'\` -SPECTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$2}'\`\n -OPTS=\"-o \$OSTYPE \${SPECTYPE:+\"-s \$SPECTYPE\"}\"\n -xterm -bg black -fg white -geometry 170x30+0-0 +sb \ --e \"runvmware \$OPTS $debug\"\n" > /mnt/var/X11R6/bin/desktop-session - chmod a+x /mnt/var/X11R6/bin/desktop-session - addpath="true"; -fi -# check if /usr/X11R6/bin is writeable, else use /var/X11R6/bin -if [ -w /mnt/usr/X11R6/bin/WM-Session ] ; then - sesspath="/usr/X11R6/bin" -else - sesspath="/var/X11R6/bin" - addpath="true" -fi - -# create links to desktop-session chooser -# fixme: wmlist is SuSE stuff !?!? -[ -f /mnt/usr/bin/X11/wmlist ] && wmlist=`cat /mnt/usr/bin/X11/wmlist` - -for i in `echo $windowmanagers|sed -e "s/,/ /g"` ; do - # beware!! quickhack for VMware sessions - strinstr "$i" "$wmlist" || \ - test -x /mnt/usr/X11R6/bin/$i || \ - echo -e "[Desktop Entry]\nX-SuSE-translate=true\nEncoding=UTF-8\n\ -Type=XSession\nExec=$i\nTryExec=$sesspath/$i\n\ -Name=$i\n" > /mnt/etc/X11/sessions/$i.desktop - # does not work correctly (add /var/X11R6/bin to path!!) - test -x /mnt/usr/X11R6/bin/$i || \ - ln -fs /var/X11R6/bin/desktop-session /mnt/$sesspath/$i -done # add special path /var/X11R6/bin to the PATH variable # fixme!! add path directly to /etc/profile!? diff --git a/initramfs/distro-specs/ubuntu/functions-6.10 b/initramfs/distro-specs/ubuntu/functions-6.10 index 44d60211..0b5c19c0 100644 --- a/initramfs/distro-specs/ubuntu/functions-6.10 +++ b/initramfs/distro-specs/ubuntu/functions-6.10 @@ -33,56 +33,6 @@ config_distro () { # how that is done for upstart?? } -# x11 stuff -descsession () { -if [ "x$desktop_session" != "x" ] ; then - windowmanagers="$desktop_session" - # write script for desktop-session chooser - if [ "x$vmware" != "xno" ] ; then - debug="" - [ ${DEBUGLEVEL} -gt 0 ] && debug="--debug 1" - echo -e "#!/bin/sh\n#\n# file generated by\n#\t$0:\n#\t$date\n -OSTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$1}'\` -SPECTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$2}'\`\n -OPTS=\"-o \$OSTYPE \${SPECTYPE:+\"-s \$SPECTYPE\"}\"\n -xterm -bg black -fg white -geometry 170x30+0-0 +sb \ --e \"runvmware \$OPTS $debug\"\n" > /mnt/var/X11R6/bin/desktop-session - chmod a+x /mnt/var/X11R6/bin/desktop-session - addpath="true"; - fi -else - windowmanagers="kde,gnome,icewm,failsafe" -fi -# check if /usr/X11R6/bin is writeable, else use /var/X11R6/bin -if [ -w /mnt/usr/X11R6/bin/WM-Session ] ; then - sesspath="/usr/X11R6/bin" -else - sesspath="/var/X11R6/bin" - addpath="true" -fi - -# create links to desktop-session chooser -# fixme: wmlist is SuSE stuff !?!? -[ -f /mnt/usr/bin/X11/wmlist ] && wmlist=`cat /mnt/usr/bin/X11/wmlist` - -for i in `echo $windowmanagers|sed -e "s/,/ /g"` ; do - # beware!! quickhack for VMware sessions - strinstr "$i" "$wmlist" || \ - test -x /mnt/usr/X11R6/bin/$i || \ - echo -e "[Desktop Entry]\nX-SuSE-translate=true\nEncoding=UTF-8\n\ -Type=XSession\nExec=$i\nTryExec=$sesspath/$i\n\ -Name=$i\n" > /mnt/etc/X11/sessions/$i.desktop - # does not work correctly (add /var/X11R6/bin to path!!) - test -x /mnt/usr/X11R6/bin/$i || \ - ln -fs /var/X11R6/bin/desktop-session /mnt/$sesspath/$i -done - -# add special path /var/X11R6/bin to the PATH variable -# fixme!! add path directly to /etc/profile!? -#[ "x$addpath" != "x" ] && \ -# echo -e "# added path component by $0: $date\n\ -#PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/profile -} # set up keytable (function run in hwautocfg) # fixme: is anything needed here - otherwise remove (and check that a diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default index ed727c4c..b1f9c34a 100644 --- a/initramfs/distro-specs/ubuntu/functions-default +++ b/initramfs/distro-specs/ubuntu/functions-default @@ -373,18 +373,6 @@ rerun\n# the mkdxsinitrd script to get them applied\n\n\ esac } -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -if [ -f /mnt/etc/init.d/vmware ] ; then -# during vmware sessions linux should not handle usb events/devices -# add special path /var/X11R6/bin to the PATH variable -# fixme!! add path directly to /etc/profile!? -echo -e "# added path component by $0: $date\n\ -PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/profile -echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules -fi -} - # configure automounter config_automount () { if [ -f /mnt/etc/init.d/autofs ] ; then |