Index: /trunk/src/VBox/Additions/linux/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 38193)
+++ /trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 38194)
@@ -311,6 +311,5 @@
 lnx_add_inst-exec_INST     = $(VBOX_LNX_ADD_INST_MOD_DIR)
 lnx_add_inst-exec_INSTTYPE = stage
-lnx_add_inst-exec_MODE     = a+rx,u+w
-lnx_add_inst-exec_SOURCES  = \
+lnx_add_inst-exec_EXEC_SOURCES  = \
 	$(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \
 	$(VBOX_REL_X11_ADD_INST)x11config.sh
@@ -320,5 +319,4 @@
 lnx_add_inst-noexec_INST     = $(VBOX_LNX_ADD_INST_SHARE_DIR)$(VBOX_LNX_ADD_PACKAGE_NAME)/
 lnx_add_inst-noexec_INSTTYPE = stage
-lnx_add_inst-noexec_MODE     = a+r,u+w
 lnx_add_inst-noexec_SOURCES  = \
 	$(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
@@ -333,5 +331,4 @@
 lnx_add_inst-license_INST     = $(VBOX_LNX_ADD_INST_OUT_DIR)
 lnx_add_inst-license_INSTTYPE = stage
-lnx_add_inst-license_MODE     = a+r,u+w
 lnx_add_inst-license_SOURCES  = \
 	$(VBOX_BRAND_LICENSE_TXT)=>LICENSE
@@ -345,11 +342,11 @@
 LnxAdd-scripts_INST     = $(VBOX_LNX_ADD_INST_STAGE_DIR)
 LnxAdd-scripts_INSTTYPE = stage
-LnxAdd-scripts_MODE     = a+rx,u+w
 LnxAdd-scripts_SOURCES  = \
+	$(VBOX_REL_LNX_ADD_INST)deffiles
+LnxAdd-scripts_EXEC_SOURCES  = \
 	$(VBOX_REL_LNX_INST_SRC)routines.sh \
 	$(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \
 	$(VBOX_REL_LNX_ADD_INST)vboxadd-service.sh=>vboxadd-service \
 	$(VBOX_REL_LNX_ADD_INST)vboxadd-x11.sh=>vboxadd-x11 \
-	$(VBOX_REL_LNX_ADD_INST)deffiles
 
 
@@ -377,19 +374,19 @@
 # this file needs editing before it can be included in the generic installer.
 $(VBOX_LNX_ADD_INST_STAGE_DIR)install.sh: \
-	$(VBOX_PATH_LNX_INST_SRC)run-inst.sh | $$(dir $$@)
+		$(VBOX_PATH_LNX_INST_SRC)run-inst.sh | $$(dir $$@)
+	$(RM) -f -- $@
 	$(QUIET)$(SED) \
-	    -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
-	    -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
-	    -e "s;_PACKAGE_;VBoxGuestAdditions;g" \
-	    -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
-	    -e "s;_BUILD_;$(shell date);g" \
-	    -e "s;_OSE_;$(VBOX_OSE);g" \
-	    -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
-	    -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
-	    -e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxadd-timesync vboxadd-service vboxadd;g" \
-	    --output $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
-	    $<
-	$(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh $@
-	$(QUIET)$(RM) $(VBOX_LNX_ADD_INST_OUT_DIR)install.sh
+		-e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
+		-e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \
+		-e "s;_PACKAGE_;VBoxGuestAdditions;g" \
+		-e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
+		-e "s;_BUILD_;$(shell date);g" \
+		-e "s;_OSE_;$(VBOX_OSE);g" \
+		-e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
+		-e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
+		-e "s;_UNINSTALL_SCRIPTS_;vboxadd-x11 vboxadd-timesync vboxadd-service vboxadd;g" \
+		--output $@ \
+		$<
+	$(QUIET)$(CHMOD) 0755 $@
 OTHER_CLEAN += \
 	$(VBOX_LNX_ADD_INST_OUT_DIR)install.sh \
Index: /trunk/src/VBox/Additions/linux/drm/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/drm/Makefile.kmk	(revision 38193)
+++ /trunk/src/VBox/Additions/linux/drm/Makefile.kmk	(revision 38194)
@@ -5,5 +5,5 @@
 
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -19,64 +19,63 @@
 include	$(KBUILD_PATH)/subheader.kmk
 
-INSTALLS += vboxvideo_drm-mod vboxvideo_drm-sh
-ifdef VBOX_WITH_ADDITION_DRIVERS
-# Only do a test build on kernels as of 2.6.27
- SYSMODS += $(if $(strip $(foreach inc,$(VBOX_LINUX_INCS),\
-                 $(wildcard $(inc)/drm/drmP.h))),vboxvideo_drm,)
-endif
-
 #
 # Populate FILES_VBOXVIDEO_DRM_NOBIN
 #
+INSTALLS += vboxvideo_drm-mod
 include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
+vboxvideo_drm-mod_INST         = $(INST_ADDITIONS)src/vboxvideo/
+vboxvideo_drm-mod_SOURCES      = \
+	$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN))
+vboxvideo_drm-mod_EXEC_SOURCES = \
+	$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_BIN)) \
+	$(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp \
+	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
+vboxvideo_drm-mod_CLEAN       += $(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp
 
-vboxvideo_drm-mod_INST        = $(INST_ADDITIONS)src/vboxvideo/
-vboxvideo_drm-mod_MODE        = a+r,u+w
-vboxvideo_drm-mod_SOURCES     = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
-
-vboxvideo_drm-sh_INST        = $(INST_ADDITIONS)src/vboxvideo/
-vboxvideo_drm-sh_MODE        = a+rx,u+w
-vboxvideo_drm-sh_SOURCES     = $(subst ",,$(FILES_VBOXVIDEO_DRM_BIN))
-vboxvideo_drm-sh_SOURCES    += \
-	$(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
-vboxvideo_drm-sh_CLEAN      += $(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp
-
-
-#
-# The module (for syntax checking).
-# The DEBUG_HASH* stuff is for  CONFIG_DYNAMIC_DEBUG-enabled kernels
-#
-vboxvideo_drm_TEMPLATE        = VBOXGUESTR0
-vboxvideo_drm_NOINST          = 1
-vboxvideo_drm_CFLAGS          = -fshort-wchar
-vboxvideo_drm_DEFS            = \
-	MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
-	KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
-        KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
-	DEBUG_HASH=2 DEBUG_HASH2=3
-vboxvideo_drm_SOURCES         = vboxvideo_drm.c
-
-# detect fc6 2.6.18
-vboxvideo_drm_DEFS           += $(foreach inc,$(VBOX_LINUX_INCS),\
-                            $(if $(wildcard $(inc)/linux/utsrelease.h),\
-                              $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
-                                then echo yes; fi),KERNEL_FC6,),))
-# detect rhel5 2.6.18
-vboxvideo_drm_DEFS           += $(foreach inc,$(VBOX_LINUX_INCS),\
-                            $(if $(wildcard $(inc)/linux/utsrelease.h),\
-                              $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
-                                then echo yes; fi),KERNEL_FC6,),))
-
-
-## Scripts needed for building kernel modules
-
-$$(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp: \
+# Script needed for building the kernel module.
+$$(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp: \
 		$(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
 		$(VBOX_VERSION_STAMP) \
 		| $$(dir $$@)
 	$(call MSG_TOOL,Creating,,$@)
-	$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" < $< > $@
-	$(QUIET)chmod 0755 $@
+	$(QUIET)$(RM) -f -- $@
+	$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" \
+		--output=$@ $<
+	$(QUIET)$(CHMOD) 0755 $@
+
+
+#
+# The kernel module.
+#
+# Note! Syntax checking only.  Don't bother if drmP.h is missing (introduced
+#       in 2.6.27).
+# Note! The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels.
+#
+if defined(VBOX_WITH_ADDITION_DRIVERS) \
+  && "$(strip $(foreach inc,$(VBOX_LINUX_INCS),$(wildcard $(inc)/drm/drmP.h)))" != ""
+ SYSMODS += vboxvideo_drm
+ vboxvideo_drm_TEMPLATE        = VBOXGUESTR0
+ vboxvideo_drm_NOINST          = 1
+ vboxvideo_drm_CFLAGS          = -fshort-wchar
+ vboxvideo_drm_DEFS            = \
+ 	MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
+ 	KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
+	KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
+ 	DEBUG_HASH=2 DEBUG_HASH2=3
+ # detect fc6 2.6.18
+ vboxvideo_drm_DEFS           += \
+ 	$(foreach inc,$(VBOX_LINUX_INCS),\
+ 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
+ 		 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
+ 		               then echo yes; fi),KERNEL_FC6,),))
+ # detect rhel5 2.6.18
+ vboxvideo_drm_DEFS           += \
+ 	$(foreach inc,$(VBOX_LINUX_INCS),\
+ 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
+ 		 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
+ 		               then echo yes; fi),KERNEL_FC6,),))
+ vboxvideo_drm_SOURCES         = vboxvideo_drm.c
+
+endif
 
 include	$(KBUILD_PATH)/subfooter.kmk
Index: /trunk/src/VBox/Additions/linux/installer/deffiles
===================================================================
--- /trunk/src/VBox/Additions/linux/installer/deffiles	(revision 38193)
+++ /trunk/src/VBox/Additions/linux/installer/deffiles	(revision 38194)
@@ -1,5 +1,5 @@
-#!/bin/sh
+## @file
+# VirtualBox linux Guest Additions default files list
 #
-# VirtualBox linux Guest Additions default files list
 
 #
@@ -79,2 +79,3 @@
     /usr/src/vboxvideo \
 "
+
Index: /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk	(revision 38193)
+++ /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk	(revision 38194)
@@ -5,5 +5,5 @@
 
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -19,26 +19,30 @@
 include	$(KBUILD_PATH)/subheader.kmk
 
-PROGRAMS += mount.vboxsf
-INSTALLS += vboxsf-mod vboxsf-sh
-ifdef VBOX_WITH_ADDITION_DRIVERS
- SYSMODS += vboxsf
-endif
 
 #
 # Populate FILES_VBOXSF_NOBIN
 #
+INSTALLS += vboxsf-mod
 include $(PATH_SUB_CURRENT)/files_vboxsf
+vboxsf-mod_INST         = $(INST_ADDITIONS)src/vboxsf/
+vboxsf-mod_SOURCES      = \
+	$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN))
+vboxsf-mod_EXEC_SOURCES = \
+	$(subst $(DQUOTE),,$(FILES_VBOXSF_BIN)) \
+	$(vboxsf-mod_0_OUTDIR)/build_in_tmp \
+	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
+vboxsf-mod_CLEAN       += $(vboxsf-mod_0_OUTDIR)/build_in_tmp
 
-vboxsf-mod_INST        = $(INST_ADDITIONS)src/vboxsf/
-vboxsf-mod_MODE        = a+r,u+w
-vboxsf-mod_SOURCES     = $(subst ",,$(FILES_VBOXSF_NOBIN))
+# Script needed for building the kernel module.
+$$(vboxsf-mod_0_OUTDIR)/build_in_tmp: \
+		$(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
+		$(VBOX_VERSION_STAMP) \
+		| $$(dir $$@)
+	$(call MSG_TOOL,Creating,,$@)
+	$(QUIET)$(RM) -f -- $@
+	$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxsf;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" \
+		--output $@ $<
+	$(QUIET)$(CHMOD) 0755 $@
 
-vboxsf-sh_INST        = $(INST_ADDITIONS)src/vboxsf/
-vboxsf-sh_MODE        = a+rx,u+w
-vboxsf-sh_SOURCES     = $(subst ",,$(FILES_VBOXSF_BIN))
-vboxsf-sh_SOURCES    += \
-	$(vboxsf-sh_0_OUTDIR)/build_in_tmp \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
-vboxsf-sh_CLEAN      += $(vboxsf-sh_0_OUTDIR)/build_in_tmp
 
 
@@ -47,39 +51,44 @@
 # The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
 #
-vboxsf_TEMPLATE        = VBOXGUESTR0
-vboxsf_NOINST          = 1
-vboxsf_CFLAGS          = -fshort-wchar
-vboxsf_DEFS            = \
-	MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
-	KBUILD_MODNAME=KBUILD_STR\(vboxsf\) \
-        KBUILD_BASENAME=KBUILD_STR\(vboxsf\) \
-	DEBUG_HASH=2 DEBUG_HASH2=3
-vboxsf_INCS            = \
-	$(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
-	$(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
-vboxsf_SOURCES         = \
-	vfsmod.c \
-	utils.c \
-	dirops.c \
-	lnkops.c \
-	regops.c
-vboxsf_LIBS            = \
-	$(VBOX_LIB_VBGL_R0)
+ifdef VBOX_WITH_ADDITION_DRIVERS
+ SYSMODS += vboxsf
+ vboxsf_TEMPLATE        = VBOXGUESTR0
+ vboxsf_NOINST          = 1
+ vboxsf_CFLAGS          = -fshort-wchar
+ vboxsf_DEFS            = \
+ 	MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
+ 	KBUILD_MODNAME=KBUILD_STR\(vboxsf\) \
+ 	KBUILD_BASENAME=KBUILD_STR\(vboxsf\) \
+ 	DEBUG_HASH=2 DEBUG_HASH2=3
+ # detect fc6 2.6.18
+ vboxsf_DEFS           += \
+ 	$(foreach inc, $(VBOX_LINUX_INCS),\
+ 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
+ 		  $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
+ 		               then echo yes; fi),KERNEL_FC6,),))
+ # detect rhel5 2.6.18
+ vboxsf_DEFS           += \
+ 	$(foreach inc, $(VBOX_LINUX_INCS),\
+ 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
+ 		  $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
+ 		               then echo yes; fi),KERNEL_FC6,),))
 
-# detect fc6 2.6.18
-vboxsf_DEFS           += $(foreach inc,$(VBOX_LINUX_INCS),\
-                            $(if $(wildcard $(inc)/linux/utsrelease.h),\
-                              $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
-                                then echo yes; fi),KERNEL_FC6,),))
-# detect rhel5 2.6.18
-vboxsf_DEFS           += $(foreach inc,$(VBOX_LINUX_INCS),\
-                            $(if $(wildcard $(inc)/linux/utsrelease.h),\
-                              $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
-                                then echo yes; fi),KERNEL_FC6,),))
-
+ vboxsf_INCS            = \
+ 	$(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
+ 	$(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
+ vboxsf_SOURCES         = \
+ 	vfsmod.c \
+ 	utils.c \
+ 	dirops.c \
+ 	lnkops.c \
+ 	regops.c
+ vboxsf_LIBS            = \
+ 	$(VBOX_LIB_VBGL_R0)
+endif
 
 #
 # The mount util.
 #
+PROGRAMS += mount.vboxsf
 mount.vboxsf_TEMPLATE    = VBOXGUESTR3EXE
 mount.vboxsf_DEFS        = _GNU_SOURCE
@@ -88,14 +97,4 @@
 	vbsfmount.c
 
-## Scripts needed for building kernel modules
-
-$$(vboxsf-sh_0_OUTDIR)/build_in_tmp: \
-		$(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
-		$(VBOX_VERSION_STAMP) \
-		| $$(dir $$@)
-	$(call MSG_TOOL,Creating,,$@)
-	$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxsf;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
-	$(QUIET)chmod 0755 $@
-
 include	$(KBUILD_PATH)/subfooter.kmk
 
Index: /trunk/src/VBox/Additions/x11/Installer/98vboxadd-xclient
===================================================================
--- /trunk/src/VBox/Additions/x11/Installer/98vboxadd-xclient	(revision 38193)
+++ /trunk/src/VBox/Additions/x11/Installer/98vboxadd-xclient	(revision 38194)
@@ -1,7 +1,9 @@
 #!/bin/sh
-#
+## @file
 # Start the Guest Additions X11 Client
 #
-# Copyright (C) 2007-2010 Oracle Corporation
+
+#
+# Copyright (C) 2007-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
