Index: trunk/src/VBox/Additions/linux/Makefile.kmk
===================================================================
--- trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 63889)
+++ trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 63890)
@@ -43,5 +43,4 @@
 VBOX_LNX_ADD_INST_LIB_DIR         := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/
 VBOX_LNX_ADD_INST_OTHER_DIR       := $(VBOX_LNX_ADD_INST_OUT_DIR)other/
-VBOX_LNX_ADD_INST_MOD_DIR         := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/
 VBOX_LNX_ADD_INST_KMOD_DIR        := $(VBOX_LNX_ADD_INST_OUT_DIR)src/
 VBOX_LNX_ADD_INST_KMOD_DIR_MOD    := $(VBOX_LNX_ADD_INST_OUT_DIR)src/vboxguest-$(VBOX_VERSION_STRING)/
@@ -53,5 +52,4 @@
 	$(VBOX_LNX_ADD_INST_SBIN_DIR) \
 	$(VBOX_LNX_ADD_INST_LIB_DIR) \
-	$(VBOX_LNX_ADD_INST_MOD_DIR) \
 	$(VBOX_LNX_ADD_INST_KMOD_DIR) \
 	$(VBOX_LNX_ADD_INST_KMOD_DIR_MOD) \
@@ -62,5 +60,5 @@
 VBOX_LNX_ADD_DBG_SBIN_DIR         := $(VBOX_LNX_ADD_INST_DBG_DIR)sbin/
 VBOX_LNX_ADD_DBG_LIB_DIR          := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/
-VBOX_LNX_ADD_DBG_MOD_DIR          := $(VBOX_LNX_ADD_INST_DBG_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/
+VBOX_LNX_ADD_DBG_OTHER_DIR        := $(VBOX_LNX_ADD_INST_DBG_DIR)other/
 
 VBOX_LNX_ADD_DBG_DIRS             := \
@@ -68,5 +66,5 @@
 	$(VBOX_LNX_ADD_DBG_SBIN_DIR) \
 	$(VBOX_LNX_ADD_DBG_LIB_DIR) \
-	$(VBOX_LNX_ADD_DBG_MOD_DIR)
+	$(VBOX_LNX_ADD_DBG_OTHER_DIR)
 
 # Script source directories
@@ -171,7 +169,7 @@
 	$(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
 	$(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
-	$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
+	$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)) \
 	$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_MOD)) \
-	$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
+	$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
 	$(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_FILES)) \
 	$(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT))
@@ -185,5 +183,5 @@
 	$(addprefix $(VBOX_LNX_ADD_DBG_SBIN_DIR),$(VBOX_LNX_ADD_STRIP_SBIN)) \
 	$(addprefix $(VBOX_LNX_ADD_DBG_LIB_DIR),$(VBOX_LNX_ADD_STRIP_LIB)) \
-	$(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
+	$(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD))
 
 ifdef VBOX_WITH_LIGHTDM_GREETER_PACKING
@@ -211,6 +209,6 @@
 	$(QUIET)objcopy --only-keep-debug $< $@
 
-$(addprefix $(VBOX_LNX_ADD_DBG_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
-		$(VBOX_LNX_ADD_DBG_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
+$(addprefix $(VBOX_LNX_ADD_DBG_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
+		$(VBOX_LNX_ADD_DBG_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
 	$(call MSG_TOOL,copydbg,$<,$@)
 	$(QUIET)objcopy --only-keep-debug $< $@
@@ -252,15 +250,15 @@
 
 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory
-$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
-		$(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% \
-		$(VBOX_LNX_ADD_DBG_MOD_DIR)% \
+$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_MOD)): \
+		$(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% \
+		$(VBOX_LNX_ADD_DBG_OTHER_DIR)% \
 		| $$(dir $$@)
 	$(call MSG_INST_FILE,$<,$@)
 	$(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
-	$(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_DBG_MOD_DIR),$@) $@
+	$(QUIET)objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_DBG_OTHER_DIR),$@) $@
 
 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory
-$(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
-		$(VBOX_LNX_ADD_INST_MOD_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
+$(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)): \
+		$(VBOX_LNX_ADD_INST_OTHER_DIR)% : $(PATH_STAGE_BIN)/additions/% | $$(dir $$@)
 	$(call MSG_INST_FILE,$<,$@)
 ifeq ($(VBOX_DO_STRIP),)
Index: trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh
===================================================================
--- trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh	(revision 63889)
+++ trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh	(revision 63890)
@@ -38,23 +38,4 @@
   MODPROBE="$MODPROBE --allow-unsupported-modules"
 fi
-
-# Check architecture
-cpu=`uname -m`;
-case "$cpu" in
-  i[3456789]86|x86)
-    cpu="x86"
-    lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
-    ;;
-  x86_64|amd64)
-    cpu="amd64"
-    lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
-    ;;
-esac
-for i in $lib_candidates; do
-  if test -d "$i/VBoxGuestAdditions"; then
-    LIB=$i
-    break
-  fi
-done
 
 # Find the version of X installed
@@ -177,7 +158,6 @@
     test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
       fail "Configuration file ${CONFIG} not complete"
-    lib_dir="$LIB/VBoxGuestAdditions"
-    res_dir="${INSTALL_DIR}/other"
-    test -x "$lib_dir" -a -x "$res_dir" ||
+    lib_dir="${INSTALL_DIR}/other"
+    test -x "${lib_dir}" ||
         fail "Invalid Guest Additions configuration found."
     # By default we want to configure X
@@ -367,5 +347,5 @@
     case "$vboxvideo_src" in
         ?*)
-        ln -s "$lib_dir/$vboxvideo_src" "$modules_dir/drivers/vboxvideo_drv$driver_ext.new" &&
+        ln -s "${lib_dir}/$vboxvideo_src" "$modules_dir/drivers/vboxvideo_drv$driver_ext.new" &&
             mv "$modules_dir/drivers/vboxvideo_drv$driver_ext.new" "$modules_dir/drivers/vboxvideo_drv$driver_ext";;
         *)
@@ -374,5 +354,5 @@
     case "$vboxmouse_src" in
         ?*)
-        ln -s "$lib_dir/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext.new" &&
+        ln -s "${lib_dir}/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext.new" &&
             mv "$modules_dir/input/vboxmouse_drv$driver_ext.new" "$modules_dir/input/vboxmouse_drv$driver_ext";;
         *)
@@ -388,5 +368,5 @@
         {
             rm -f "/usr/share/xserver-xorg/pci/vboxvideo.ids"
-            ln -s "$res_dir/vboxvideo.ids" /usr/share/xserver-xorg/pci 2>/dev/null
+            ln -s "${lib_dir}/vboxvideo.ids" /usr/share/xserver-xorg/pci 2>/dev/null
             test -n "$automouse" && setupxorgconf=""
         }
@@ -401,5 +381,5 @@
                         generated="$generated  `printf "$i\n"`"
                     else
-                        "$res_dir/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga "$i"
+                        "${lib_dir}/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga "$i"
                     fi
                     configured="true"
@@ -414,5 +394,5 @@
             if test -z "$configured"; then
                 touch "$main_cfg"
-                "$res_dir/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga --noBak "$main_cfg"
+                "${lib_dir}/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga --noBak "$main_cfg"
                 touch "${nobak_cfg}"
             fi
@@ -437,9 +417,9 @@
         # open device files
         Fedora\ release\ 7* | Fedora\ release\ 8* )
-            semodule -i "$res_dir/vbox_x11.pp" > /dev/null 2>&1
+            semodule -i "${lib_dir}/vbox_x11.pp" > /dev/null 2>&1
             ;;
         # Similar for the accelerated graphics check on Fedora 15
         Fedora\ release\ 15* )
-            semodule -i "$res_dir/vbox_accel.pp" > /dev/null 2>&1
+            semodule -i "${lib_dir}/vbox_accel.pp" > /dev/null 2>&1
             ;;
     esac
@@ -449,5 +429,5 @@
     case "$redhat_release" in
         Fedora\ release\ 8* )
-            chcon -u system_u -t lib_t "$lib_dir"/*.so
+            chcon -u system_u -t lib_t "${lib_dir}"/*.so
             ;;
     esac
@@ -460,7 +440,7 @@
 
     # And set up VBoxClient to start when the X session does
-    install_x11_startup_app "$res_dir/98vboxadd-xclient" "$res_dir/vboxclient.desktop" VBoxClient VBoxClient-all ||
+    install_x11_startup_app "${lib_dir}/98vboxadd-xclient" "${lib_dir}/vboxclient.desktop" VBoxClient VBoxClient-all ||
         fail "See the log file $LOG for more information."
-    ln -s "$res_dir/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
+    ln -s "${lib_dir}/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
 }
 
Index: trunk/src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 63889)
+++ trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 63890)
@@ -382,5 +382,5 @@
 
     # Put mount.vboxsf in the right place
-    ln -sf "$lib_path/$PACKAGE/mount.vboxsf" /sbin
+    ln -sf "${INSTALL_DIR}/other/mount.vboxsf" /sbin
     # And a post-installation script for rebuilding modules when a new kernel
     # is installed.
@@ -406,6 +406,6 @@
         # the real path.  The "chcon" is there as a back-up for old guests.
         command -v semanage > /dev/null &&
-            semanage fcontext -a -t mount_exec_t "/usr/lib/$PACKAGE/mount.vboxsf"
-        chcon -t mount_exec_t "$lib_path/$PACKAGE/mount.vboxsf"
+            semanage fcontext -a -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf"
+        chcon -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf"
     fi
 }
