Changeset 56842 in vbox for trunk/src/VBox/Installer
- Timestamp:
- Jul 7, 2015 3:36:24 PM (10 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/install.sh
r56777 r56842 376 376 377 377 # Install runlevel scripts 378 # Note: vboxdrv is also handled by setup_init_script. This function will379 # use chkconfig to adjust the sequence numbers, therefore vboxdrv380 # numbers here should match the numbers in the vboxdrv.sh check381 # header!382 378 install_init_script vboxdrv.sh vboxdrv 383 379 install_init_script vboxballoonctrl-service.sh vboxballoonctrl-service … … 480 476 cur=`pwd` 481 477 log "" 482 setup_init_script vboxdrv478 ./vboxdrv.sh setup 483 479 # Start VirtualBox kernel module 484 480 if [ $RETVAL -eq 0 ] && ! start_init_script vboxdrv; then -
trunk/src/VBox/Installer/linux/routines.sh
r56777 r56842 239 239 ## The action to perform, normally "start", "stop" or "status". 240 240 action="${2}" 241 ## The optional expression to check for in the script before starting.242 expression="${3}"243 241 test ! -z "${name}" && test ! -z "${action}" || \ 244 242 { log "${self}: missing argument" && return 1; } … … 253 251 return 1 254 252 fi 255 test -n "${expression}" && ! grep -q "${expression}" "${script}" && return 0 256 case "${action}" in 257 start|stop|reload|restart|try-restart|force-reload|status) 258 if test -x "`which service 2>/dev/null`" 259 then 260 service "${name}" ${action} 261 elif test -x "`which invoke-rc.d 2>/dev/null`" 262 then 263 invoke-rc.d "${name}" ${action} 264 else 265 "${script}" "${action}" 266 fi 267 ;; 268 *) 253 if test -x "`which service 2>/dev/null`" 254 then 255 service "${name}" ${action} 256 elif test -x "`which invoke-rc.d 2>/dev/null`" 257 then 258 invoke-rc.d "${name}" ${action} 259 else 269 260 "${script}" "${action}" 270 ;; 271 esac 261 fi 272 262 } 273 263 … … 282 272 { 283 273 do_sysvinit_action "${1}" stop 284 }285 286 ## Do initial setup of an installed service287 setup_init_script()288 {289 do_sysvinit_action "${1}" setup '^# *setup_script *$'290 }291 292 ## Do pre-removal cleanup of an installed service293 cleanup_init_script()294 {295 do_sysvinit_action "${1}" cleanup '^# *cleanup_script *$'296 274 } 297 275 -
trunk/src/VBox/Installer/linux/run-inst.sh
r56777 r56842 151 151 for i in $UNINSTALL_SCRIPTS; do 152 152 stop_init_script "$i" 153 cleanup_init_script "$i" 1>&2 2>> "$LOGFILE" 154 test -x "./$i" && "./$i" cleanup 1>&2 2>> "$LOGFILE" 153 test -z "$NO_CLEANUP" && test -x "./$i" && "./$i" cleanup 1>&2 2>> "$LOGFILE" 155 154 delrunlevel "$i" 156 155 remove_init_script "$i" 156 done 157 for i in "/opt/$PACKAGE-"*/init/*; do 158 test -z "$NO_CLEANUP" && grep -q '^# *cleanup_script *$' "${i}" && "${i}" cleanup 1>&2 2>> "$LOGFILE" 157 159 done 158 160 … … 421 423 install_init_script "$i" "`basename "$i"`" 422 424 addrunlevel "`basename "$i"`" 423 test -n "$DO_SETUP" && setup_init_script "`basename "$i"`"1>&2425 test -n "$DO_SETUP" && grep -q '^# *setup_script *$' "${i}" && "${i}" setup 1>&2 424 426 start_init_script "`basename "$i"`" 425 427 fi … … 461 463 if test -r "\$i"; then 462 464 stop_init_script "\`basename "\$i"\`" 463 test -z "\$ NO_CLEANUP" && cleanup_init_script "\`basename "\$i"\`"2>> "\$LOGFILE"465 test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE" 464 466 delrunlevel "\`basename "\$i"\`" 465 467 remove_init_script "\`basename "\$i"\`"
Note:
See TracChangeset
for help on using the changeset viewer.