Fix logical structure of config_vmware().
[grml-autoconfig.git] / autoconfig.functions
index 527dd80..4b603a5 100755 (executable)
@@ -389,8 +389,8 @@ if checkbootparam novmware ; then
    ewarn "Skipping running vmware specific stuff as requested on boot commandline." ; eend 0
 else
    if [ -z "$INSTALLED" ] ; then
-      if ! checkbootparam qemu ; then
-         if vmware-detect ; then
+      if vmware-detect || stringinstring "BOOT_IMAGE=vmware " "$CMDLINE" ; then
+              if ! checkbootparam qemu ; then
             if [ -r /etc/X11/xorg.conf.vmware ] ; then
                einfo "VMware: Copying /etc/X11/xorg.conf.vmware to /etc/X11/xorg.conf"
                cp /etc/X11/xorg.conf.vmware /etc/X11/xorg.conf ; eend $?
@@ -2131,6 +2131,18 @@ fi
 }
 # }}}
 
+# {{{ Support customization
+config_distri(){
+if checkbootparam "distri"; then
+  DISTRI="$(getbootparam 'distri' 2>>$DEBUG)"
+  if [ -r /cdrom/desktop/"$DISTRI".jpg ] ; then
+     [ -n "$BOOTDEBUG" ] && einfo "Debug: bootoption distri found and file /cdrom/desktop/$DISTRI present" && eend 0
+     cp /cdrom/desktop/"$DISTRI".jpg /usr/share/grml/desktop.jpg
+  fi
+fi
+}
+# }}}
+
 ### {{{ backwards compatible stuff
 config_environment(){
   ewarn "config_environment is deprecated. Please set CONFIG_ENVIRONMENT in /etc/grml/autoconfig to 'no'." ; eend 0