vbox的更動 61199 路徑 trunk/src/VBox/Additions
- 時間撮記:
- 2016-5-25 下午05:51:35 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r61176 r61199 29 29 ### END INIT INFO 30 30 31 ## @todo This file duplicates a lot of script with vboxdrv.sh. When making 32 # changes please try to reduce differences between the two wherever possible. 33 31 34 PATH=$PATH:/bin:/sbin:/usr/sbin 32 35 PACKAGE=VBoxGuestAdditions … … 35 38 OLDMODULES="vboxguest vboxadd vboxsf vboxvfs vboxvideo" 36 39 SCRIPTNAME=vboxadd.sh 40 QUICKSETUP= 37 41 38 42 if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules *0'; then … … 166 170 { 167 171 begin "Starting the VirtualBox Guest Additions" console; 172 # If we got this far assume that the slow set-up has been done. 173 QUICKSETUP=yes 168 174 if test -r $config; then 169 175 . $config … … 300 306 { 301 307 # don't stop the old modules here -- they might be in use 302 cleanup_modules308 test -z "${QUICKSETUP}" && cleanup_modules 303 309 begin "Building the VirtualBox Guest Additions kernel modules" 304 310 305 311 begin "Building the main Guest Additions module" 306 if ! $BUILDINTMP \ 307 --save-module-symvers /tmp/vboxguest-Module.symvers \ 308 --module-source $MODULE_SRC/vboxguest \ 309 --no-print-directory install >> $LOG 2>&1; then 310 show_error "Look at $LOG to find out what went wrong" 311 return 1 312 fi 313 succ_msg 314 begin "Building the shared folder support module" 315 if ! $BUILDINTMP \ 316 --use-module-symvers /tmp/vboxguest-Module.symvers \ 317 --module-source $MODULE_SRC/vboxsf \ 318 --no-print-directory install >> $LOG 2>&1; then 319 show_error "Look at $LOG to find out what went wrong" 320 return 1 321 fi 322 succ_msg 323 begin "Building the graphics driver module" 324 if ! $BUILDINTMP \ 325 --use-module-symvers /tmp/vboxguest-Module.symvers \ 326 --module-source $MODULE_SRC/vboxvideo \ 327 --no-print-directory install >> $LOG 2>&1; then 328 show_error "Look at $LOG to find out what went wrong" 329 fi 330 succ_msg 331 depmod 312 for i in /lib/modules/*; do 313 test -d "${i}/build" || continue 314 # This does not work for 2.4 series kernels. How sad. 315 test -n "${QUICKSETUP}" && test -f "${i}/misc/vboxguest.ko" && continue 316 begin "Building for kernel ${i##*/}" console 317 export KERN_DIR="${i}/build" 318 export MODULE_DIR="${i}/misc" 319 if ! $BUILDINTMP \ 320 --save-module-symvers /tmp/vboxguest-Module.symvers \ 321 --module-source $MODULE_SRC/vboxguest \ 322 --no-print-directory install >> $LOG 2>&1; then 323 show_error "Look at $LOG to find out what went wrong" 324 test "${i##*/}" = "`uname -r`" && return 1 325 fi 326 succ_msg 327 begin "Building the shared folder support module" 328 if ! $BUILDINTMP \ 329 --use-module-symvers /tmp/vboxguest-Module.symvers \ 330 --module-source $MODULE_SRC/vboxsf \ 331 --no-print-directory install >> $LOG 2>&1; then 332 show_error "Look at $LOG to find out what went wrong" 333 test "${i##*/}" = "`uname -r`" && return 1 334 fi 335 succ_msg 336 begin "Building the graphics driver module" 337 if ! $BUILDINTMP \ 338 --use-module-symvers /tmp/vboxguest-Module.symvers \ 339 --module-source $MODULE_SRC/vboxvideo \ 340 --no-print-directory install >> $LOG 2>&1; then 341 show_error "Look at $LOG to find out what went wrong" 342 fi 343 succ_msg 344 depmod "${i##*/}" 345 done 332 346 return 0 333 347 } … … 381 395 ln -sf "$lib_path/$PACKAGE/vboxadd" /sbin/rcvboxadd 382 396 ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11 397 # And a post-installation script for rebuilding modules when a new kernel 398 # is installed. 399 mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 400 cat << EOF > /etc/kernel/postinst.d/vboxadd 401 #!/bin/sh 402 /sbin/rcvboxadd quicksetup 403 exit 0 404 EOF 405 cat << EOF > /etc/kernel/prerm.d/vboxadd 406 #!/bin/sh 407 for i in ${OLDMODULES}; do rm -f /lib/modules/"\${1}"/misc/"\${i}".ko; done 408 rmdir -p /lib/modules/"\$1"/misc 2>/dev/null 409 exit 0 410 EOF 411 chmod 0755 /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd 383 412 # At least Fedora 11 and Fedora 12 require the correct security context when 384 413 # executing this command from service scripts. Shouldn't hurt for other … … 424 453 show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed." 425 454 fi 426 extra_setup455 test -z "${QUICKSETUP}" && extra_setup 427 456 if [ "$mod_succ" -eq "0" ]; then 428 457 if running_vboxguest || running_vboxadd; then … … 460 489 rm /sbin/rcvboxadd 2>/dev/null 461 490 rm /sbin/rcvboxadd-x11 2>/dev/null 491 rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd 492 rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null 462 493 rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null 463 494 } … … 485 516 setup && start 486 517 ;; 518 quicksetup) 519 QUICKSETUP=yes 520 setup && start 521 ;; 487 522 cleanup) 488 523 cleanup … … 492 527 ;; 493 528 *) 494 echo "Usage: $0 {start|stop|restart|status|setup }"529 echo "Usage: $0 {start|stop|restart|status|setup|quicksetup|cleanup}" 495 530 exit 1 496 531 esac
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器