Changeset 76046 in vbox
- Timestamp:
- Dec 7, 2018 10:18:49 AM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/install.sh.in
r75839 r76046 471 471 472 472 # Install, set up and start init scripts 473 for i in "$INSTALLATION_DIR/init/vboxadd" "$INSTALLATION_DIR/init/vboxadd-service"; do 474 install_init_script "$i" "`basename "$i"`" 2>> "${LOGFILE}" 475 addrunlevel "`basename "$i"`" 2>> "${LOGFILE}" 476 start_init_script "`basename "$i"`" 2>> "${LOGFILE}" 477 done 473 install_init_script "$INSTALLATION_DIR"/init/vboxadd vboxadd 2>> "$LOGFILE" 474 install_init_script "$INSTALLATION_DIR"/init/vboxadd-service vboxadd-service \ 475 2>> "$LOGFILE" 476 finish_init_script_install 477 addrunlevel vboxadd 2>> "$LOGFILE" 478 addrunlevel vboxadd-service 2>> "$LOGFILE" 479 start_init_script vboxadd 2>> "$LOGFILE" 480 start_init_script vboxadd-service 2>> "$LOGFILE" 478 481 479 482 cp $ROUTINES $INSTALLATION_DIR … … 509 512 510 513 # Stop and clean up all services 511 for i in "$INSTALLATION_DIR/init/vboxadd-service" "$INSTALLATION_DIR/init/vboxadd"; do 512 if test -r "\$i"; then 513 stop_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}" 514 test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE" 515 delrunlevel "\`basename "\$i"\`" 2>> "${LOGFILE}" 516 remove_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}" 517 fi 518 done 514 if test -r "$INSTALLATION_DIR"/init/vboxadd-service; then 515 stop_init_script vboxadd-service 2>> "\$LOGFILE" 516 delrunlevel vboxadd-service 2>> "\$LOGFILE" 517 remove_init_script vboxadd-service 2>> "\$LOGFILE" 518 fi 519 if test -r "$INSTALLATION_DIR"/init/vboxadd; then 520 stop_init_script vboxadd 2>> "\$LOGFILE" 521 test -n "\$NO_CLEANUP" || "$INSTALLATION_DIR"/init/vboxadd cleanup 2>> "\$LOGFILE" 522 delrunlevel vboxadd 2>> "\$LOGFILE" 523 remove_init_script vboxadd 2>> "\$LOGFILE" 524 fi 525 finish_init_script_install 519 526 520 527 # Load all modules -
trunk/src/VBox/Installer/linux/postinst-common.sh
r69500 r76046 57 57 install_init_script "${MY_PATH}/vboxautostart-service.sh" vboxautostart-service 58 58 install_init_script "${MY_PATH}/vboxweb-service.sh" vboxweb-service 59 finish_init_script_install 59 60 60 61 delrunlevel vboxdrv -
trunk/src/VBox/Installer/linux/prerm-common.sh
r69500 r76046 67 67 delrunlevel vboxnet >/dev/null 2>&1 68 68 remove_init_script vboxnet >/dev/null 2>&1 69 finish_init_script_install 69 70 rm -f /sbin/vboxconfig 70 71 exit 0 -
trunk/src/VBox/Installer/linux/routines.sh
r72196 r76046 173 173 WantedBy=multi-user.target 174 174 EOF 175 systemctl daemon-reexec 176 } 177 178 ## Installs a file containing a shell script as an init script 175 } 176 177 use_systemd() 178 { 179 test ! -f /sbin/init || test -L /sbin/init 180 } 181 182 ## Installs a file containing a shell script as an init script. Call 183 # finish_init_script_install when all scripts have been installed. 179 184 install_init_script() 180 185 { … … 191 196 ln -s "${script}" "/sbin/rc${name}" 192 197 if test -x "`which systemctl 2>/dev/null`"; then 193 if ! test -f /sbin/init || ls -l /sbin/init | grep -q ">.*systemd"; then198 if use_systemd; then 194 199 { systemd_wrap_init_script "$script" "$name"; return; } 195 200 fi … … 219 224 rm -f "/etc/rc.d/init.d/$name" 220 225 rm -f "/etc/init.d/$name" 226 } 227 228 ## Tell systemd services have been installed or removed. Should not be done 229 # after each individual one, as systemd can crash if it is done too often 230 # (reported by the OL team for OL 7.6, may not apply to other versions.) 231 finish_init_script_install() 232 { 233 if use_systemd; then 234 systemctl daemon-reexec 235 fi 221 236 } 222 237
Note:
See TracChangeset
for help on using the changeset viewer.