Index: /trunk/src/VBox/Main/UnattendedTemplates/debian_postinstall.sh
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/debian_postinstall.sh	(revision 68188)
+++ /trunk/src/VBox/Main/UnattendedTemplates/debian_postinstall.sh	(revision 68189)
@@ -206,7 +206,12 @@
 echo '** Installing Test Execution Service...' | tee -a "${MY_LOGFILE}"
 log_command_in_target test "${MY_CHROOT_CDROM}/vboxvalidationkit/linux/@@VBOX_INSERT_OS_ARCH@@/TestExecService"
-log_command mkdir -p "${MY_TARGET}/root/validationkit" "${MY_TARGET}/media/cdrom"
-log_command cp -R ${MY_CDROM_NOCHROOT}/vboxvalidationkit/* "${MY_TARGET}/root/validationkit/"
-log_command chmod -R u+rw,a+xr "${MY_TARGET}/root/validationkit/"
+log_command mkdir -p "${MY_TARGET}/opt/validationkit" "${MY_TARGET}/media/cdrom"
+log_command cp -R ${MY_CDROM_NOCHROOT}/vboxvalidationkit/* "${MY_TARGET}/opt/validationkit/"
+log_command chmod -R u+rw,a+xr "${MY_TARGET}/opt/validationkit/"
+if [ -e "${MY_TARGET}/usr/bin/chcon" -o -e "${MY_TARGET}/bin/chcon" -o -e "${MY_TARGET}/usr/sbin/chcon" -o -e "${MY_TARGET}/sbin/chcon" ]; then
+    MY_IGNORE_EXITCODE=1
+    log_command_in_target chcon -R -t usr_t "/opt/validationkit/"
+    MY_IGNORE_EXITCODE=
+fi
 
 # systemd service config:
@@ -214,5 +219,5 @@
 test -d "${MY_TARGET}/usr/lib/systemd/system" && MY_UNIT_PATH="${MY_TARGET}/usr/lib/systemd/system"
 if [ -d "${MY_UNIT_PATH}" ]; then
-    log_command cp "${MY_CDROM_NOCHROOT}/vboxvalidationkit/linux/vboxtxs.service" "${MY_UNIT_PATH}/vboxtxs.service"
+    log_command cp "${MY_TARGET}/opt/validationkit/linux/vboxtxs.service" "${MY_UNIT_PATH}/vboxtxs.service"
     log_command chmod 644 "${MY_UNIT_PATH}/vboxtxs.service"
     log_command_in_target systemctl -q enable vboxtxs
Index: /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh	(revision 68188)
+++ /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh	(revision 68189)
@@ -190,5 +190,7 @@
 log_command chmod -R u+rw,a+xr "${MY_TARGET}/opt/validationkit/"
 if [ -e "${MY_TARGET}/usr/bin/chcon" -o -e "${MY_TARGET}/bin/chcon" -o -e "${MY_TARGET}/usr/sbin/chcon" -o -e "${MY_TARGET}/sbin/chcon" ]; then
+    MY_IGNORE_EXITCODE=1
     log_command_in_target chcon -R -t usr_t "/opt/validationkit/"
+    MY_IGNORE_EXITCODE=
 fi
 
@@ -197,6 +199,4 @@
 test -d "${MY_TARGET}/usr/lib/systemd/system" && MY_UNIT_PATH="${MY_TARGET}/usr/lib/systemd/system"
 if [ -d "${MY_UNIT_PATH}" ]; then
-    log_command sed -e "s,/root/,/opt/,g" -i .bak "${MY_TARGET}/opt/validationkit/linux/vboxtxs"
-    log_command sed -e "s,/root/,/opt/,g" -i .bak "${MY_TARGET}/opt/validationkit/linux/vboxtxs.service"
     log_command cp "${MY_TARGET}/opt/validationkit/linux/vboxtxs.service" "${MY_UNIT_PATH}/vboxtxs.service"
     log_command chmod 644 "${MY_UNIT_PATH}/vboxtxs.service"
