VirtualBox

Changeset 76046 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Dec 7, 2018 10:18:49 AM (6 years ago)
Author:
vboxsync
Message:

Linux installers: do not call daemon-restart too often.
bugref:3809: Linux installer maintenance
Some versions of systemd can crash if daemon-restart is called too often, so
only call it once per installation or uninstallation. Do some clean-up of
overly-generic shell script as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/install.sh.in

    r75839 r76046  
    471471
    472472# 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
     473install_init_script "$INSTALLATION_DIR"/init/vboxadd vboxadd 2>> "$LOGFILE"
     474install_init_script "$INSTALLATION_DIR"/init/vboxadd-service vboxadd-service \
     475    2>> "$LOGFILE"
     476finish_init_script_install
     477addrunlevel vboxadd 2>> "$LOGFILE"
     478addrunlevel vboxadd-service 2>> "$LOGFILE"
     479start_init_script vboxadd 2>> "$LOGFILE"
     480start_init_script vboxadd-service 2>> "$LOGFILE"
    478481
    479482cp $ROUTINES $INSTALLATION_DIR
     
    509512
    510513# 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
     514if 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"
     518fi
     519if 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"
     524fi
     525finish_init_script_install
    519526
    520527# Load all modules
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette