Index: /trunk/src/VBox/Additions/linux/installer/install.sh.in
===================================================================
--- /trunk/src/VBox/Additions/linux/installer/install.sh.in	(revision 76045)
+++ /trunk/src/VBox/Additions/linux/installer/install.sh.in	(revision 76046)
@@ -471,9 +471,12 @@
 
 # Install, set up and start init scripts
-for i in "$INSTALLATION_DIR/init/vboxadd" "$INSTALLATION_DIR/init/vboxadd-service"; do
-    install_init_script "$i" "`basename "$i"`" 2>> "${LOGFILE}"
-    addrunlevel "`basename "$i"`" 2>> "${LOGFILE}"
-    start_init_script "`basename "$i"`" 2>> "${LOGFILE}"
-done
+install_init_script "$INSTALLATION_DIR"/init/vboxadd vboxadd 2>> "$LOGFILE"
+install_init_script "$INSTALLATION_DIR"/init/vboxadd-service vboxadd-service \
+    2>> "$LOGFILE"
+finish_init_script_install
+addrunlevel vboxadd 2>> "$LOGFILE"
+addrunlevel vboxadd-service 2>> "$LOGFILE"
+start_init_script vboxadd 2>> "$LOGFILE"
+start_init_script vboxadd-service 2>> "$LOGFILE"
 
 cp $ROUTINES $INSTALLATION_DIR
@@ -509,12 +512,16 @@
 
 # Stop and clean up all services
-for i in "$INSTALLATION_DIR/init/vboxadd-service" "$INSTALLATION_DIR/init/vboxadd"; do
-    if test -r "\$i"; then
-        stop_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
-        test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE"
-        delrunlevel "\`basename "\$i"\`" 2>> "${LOGFILE}"
-        remove_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
-    fi
-done
+if test -r "$INSTALLATION_DIR"/init/vboxadd-service; then
+    stop_init_script vboxadd-service 2>> "\$LOGFILE"
+    delrunlevel vboxadd-service 2>> "\$LOGFILE"
+    remove_init_script vboxadd-service 2>> "\$LOGFILE"
+fi
+if test -r "$INSTALLATION_DIR"/init/vboxadd; then
+    stop_init_script vboxadd 2>> "\$LOGFILE"
+    test -n "\$NO_CLEANUP" || "$INSTALLATION_DIR"/init/vboxadd cleanup 2>> "\$LOGFILE"
+    delrunlevel vboxadd 2>> "\$LOGFILE"
+    remove_init_script vboxadd 2>> "\$LOGFILE"
+fi
+finish_init_script_install
 
 # Load all modules
Index: /trunk/src/VBox/Installer/linux/postinst-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 76045)
+++ /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 76046)
@@ -57,4 +57,5 @@
 install_init_script "${MY_PATH}/vboxautostart-service.sh" vboxautostart-service
 install_init_script "${MY_PATH}/vboxweb-service.sh" vboxweb-service
+finish_init_script_install
 
 delrunlevel vboxdrv
Index: /trunk/src/VBox/Installer/linux/prerm-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 76045)
+++ /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 76046)
@@ -67,4 +67,5 @@
 delrunlevel vboxnet >/dev/null 2>&1
 remove_init_script vboxnet >/dev/null 2>&1
+finish_init_script_install
 rm -f /sbin/vboxconfig
 exit 0
Index: /trunk/src/VBox/Installer/linux/routines.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/routines.sh	(revision 76045)
+++ /trunk/src/VBox/Installer/linux/routines.sh	(revision 76046)
@@ -173,8 +173,13 @@
 WantedBy=multi-user.target
 EOF
-    systemctl daemon-reexec
-}
-
-## Installs a file containing a shell script as an init script
+}
+
+use_systemd()
+{
+    test ! -f /sbin/init || test -L /sbin/init
+}
+
+## Installs a file containing a shell script as an init script.  Call
+# finish_init_script_install when all scripts have been installed.
 install_init_script()
 {
@@ -191,5 +196,5 @@
     ln -s "${script}" "/sbin/rc${name}"
     if test -x "`which systemctl 2>/dev/null`"; then
-        if ! test -f /sbin/init || ls -l /sbin/init | grep -q ">.*systemd"; then
+        if use_systemd; then
             { systemd_wrap_init_script "$script" "$name"; return; }
         fi
@@ -219,4 +224,14 @@
     rm -f "/etc/rc.d/init.d/$name"
     rm -f "/etc/init.d/$name"
+}
+
+## Tell systemd services have been installed or removed.  Should not be done
+# after each individual one, as systemd can crash if it is done too often
+# (reported by the OL team for OL 7.6, may not apply to other versions.)
+finish_init_script_install()
+{
+    if use_systemd; then
+        systemctl daemon-reexec
+    fi
 }
 
