Changeset 57969 in vbox for trunk/src/VBox/Installer/linux
- Timestamp:
- Sep 30, 2015 2:48:47 PM (9 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/Makefile.include.footer
r56299 r57969 88 88 endif # eq($(MAKECMDGOALS),clean) 89 89 90 # important: Don't remove Module.symvers! DKMS does 'make clean' before building ...91 90 clean: 92 91 for f in $(MOD_CLEAN); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done -
trunk/src/VBox/Installer/linux/debian/control
r55078 r57969 18 18 Pre-Depends: debconf (>= 1.1) | debconf-2.0 19 19 Depends: ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0, psmisc, adduser 20 Recommends: ${alsa}, ${pulse}, ${sdlttf}, ${dkms}, 21 linux-headers, gcc, make, binutils, 20 Recommends: ${alsa}, ${pulse}, ${sdlttf}, kmod | kldutils | module-init-tools, 21 linux-headers-generic | linux-headers-generic-pae | linux-headers-686-pae | linux-headers-amd64 | linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers, 22 linux-image, gcc, make | build-essential | dpkg-dev, binutils, 22 23 pdf-viewer, libgl1 23 24 Provides: virtualbox -
trunk/src/VBox/Installer/linux/debian/postinst.in
r57888 r57969 120 120 121 121 # Install and start the new service scripts. 122 PRERM_DKMS=123 test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"124 122 POSTINST_START=--start 125 123 test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START= 126 /usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS}|| true124 /usr/lib/virtualbox/prerm-common.sh || true 127 125 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true 128 126 -
trunk/src/VBox/Installer/linux/debian/prerm.in
r57888 r57969 30 30 db_capb backup 31 31 32 if ! /usr/lib/virtualbox/prerm-common.sh --dkms %VER%> /dev/null 2>&1; then32 if ! /usr/lib/virtualbox/prerm-common.sh > /dev/null 2>&1; then 33 33 if [ "$1" != "failed-upgrade" ]; then 34 34 db_fset virtualbox/old-running seen false || true -
trunk/src/VBox/Installer/linux/debian/rules
r57888 r57969 293 293 -Valsa=$(if $(HEADLESS),,libasound2) \ 294 294 -Vpulse=$(if $(HEADLESS),,libpulse0) \ 295 -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \ 296 -Vdkms=$(if $(filter _Debian_lenny,$(debrel)),,dkms) 295 -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) 297 296 dh_md5sums 298 297 dh_builddeb --destdir $(pkgdir) -- \ -
trunk/src/VBox/Installer/linux/install.sh
r57940 r57969 43 43 ACTION="" 44 44 SELF=$1 45 DKMS=`which dkms 2> /dev/null`46 45 RC_SCRIPT=0 47 46 if [ -n "$HARDENED" ]; then … … 216 215 217 216 # Remove previous installation 218 if [ ! "$VERSION" = "$INSTALL_VER" -a ! "$BUILD_MODULE" = "true" -a -n "$DKMS" ]219 then220 # Not doing this can confuse dkms221 info "Rebuilding the kernel module after version change"222 BUILD_MODULE=true223 fi224 217 test "${BUILD_MODULE}" = true || VBOX_DONT_REMOVE_OLD_MODULES=1 225 218 -
trunk/src/VBox/Installer/linux/postinst-common.sh
r57712 r57969 51 51 fi 52 52 53 # Remove any traces of DKMS from previous installations. 54 for i in vboxhost vboxdrv vboxnetflt vboxnetadp; do 55 rm -rf "/var/lib/dkms/${i}"* 56 done 57 53 58 # Install runlevel scripts and systemd unit files 54 59 install_init_script "${TARGET}/vboxdrv.sh" vboxdrv -
trunk/src/VBox/Installer/linux/prerm-common.sh
r57868 r57969 31 31 . "./routines.sh" 32 32 33 DO_DKMS=34 VERSION=35 while true36 do37 test -z "${1}" && break38 case "${1}" in39 --dkms)40 DO_DKMS=true41 shift42 VERSION="${1}"43 if test -z "${VERSION}"; then44 echo "--dkms requires a version"45 exit 146 fi47 ;;48 *)49 echo "Bad argument ${1}" >&250 exit 151 ;;52 esac53 shift54 done55 56 33 # Stop the ballon control service 57 34 stop_init_script vboxballoonctrl-service 2>/dev/null … … 73 50 delrunlevel vboxweb-service 74 51 remove_init_script vboxweb-service 75 DKMS=`which dkms 2>/dev/null`76 if test "$DO_DKMS" = true && test -n "$DKMS"; then77 $DKMS remove -m vboxhost -v "${VERSION}" --all > /dev/null 2>&178 $DKMS remove -m vboxdrv -v "${VERSION}" --all > /dev/null 2>&179 $DKMS remove -m vboxnetflt -v "${VERSION}" --all > /dev/null 2>&180 $DKMS remove -m vboxnetadp -v "${VERSION}" --all > /dev/null 2>&181 fi82 52 # Stop kernel module and uninstall runlevel script 83 53 stop_init_script vboxdrv 2>/dev/null -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r57876 r57969 319 319 fi 320 320 # Install and start the new service scripts. 321 PRERM_DKMS=322 test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"323 321 POSTINST_START=--start 324 322 test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START= 325 /usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS}|| true323 /usr/lib/virtualbox/prerm-common.sh || true 326 324 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true 327 325 … … 333 331 # $1>=1: upgrade 334 332 if [ "$1" = 0 ]; then 335 /usr/lib/virtualbox/prerm-common.sh --dkms|| exit 1333 /usr/lib/virtualbox/prerm-common.sh || exit 1 336 334 rm -f /etc/udev/rules.d/60-vboxdrv.rules 337 335 rm -f /etc/vbox/license_agreed -
trunk/src/VBox/Installer/linux/uninstall.sh
r57940 r57969 30 30 check_root 31 31 32 [ -z "$DKMS" ] && DKMS=`which dkms 2> /dev/null`33 32 [ -z "$CONFIG_DIR" ] && CONFIG_DIR="/etc/vbox" 34 33 [ -z "$CONFIG" ] && CONFIG="vbox.cfg" … … 50 49 # Do pre-removal common to all installer types, currently service script 51 50 # clean-up. 52 test "${BUILD_MODULE}" = true && DO_DKMS="--dkms ${INSTALL_VER}" 53 `dirname $0`/prerm-common.sh ${DO_DKMS} || exit 1 # Arguments intentionally not quoted. 51 `dirname $0`/prerm-common.sh || exit 1 # Arguments intentionally not quoted. 54 52 55 53 # Remove kernel module installed 56 if [ -n "$DKMS" ]; then57 $DKMS remove -m vboxhost -v $INSTALL_VER --all > /dev/null 2>&158 fi59 54 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then 60 55 find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null -
trunk/src/VBox/Installer/linux/vboxdrv.sh.in
r57945 r57969 27 27 ### END INIT INFO 28 28 29 ## @todo get rid of the autogeneration, perhaps write " version" and "group" to29 ## @todo get rid of the autogeneration, perhaps write "group" to 30 30 ## a configuration file in /etc 31 31 … … 33 33 DEVICE=/dev/vboxdrv 34 34 LOG="/var/log/vbox-install.log" 35 VERSION=%VERSION%36 35 MODPROBE=/sbin/modprobe 37 36 SCRIPTNAME=vboxdrv … … 54 53 fi 55 54 BUILDINTMP="$MODULE_SRC/build_in_tmp" 56 DODKMS="$MODULE_SRC/do_dkms"57 55 58 56 # silently exit if the package was uninstalled but not purged, … … 236 234 { 237 235 stop 238 DKMS=`which dkms 2>/dev/null`239 if [ -n "$DKMS" ]; then240 begin_msg "Uninstalling old VirtualBox DKMS kernel modules"241 $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG242 succ_msg243 fi244 236 if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then 245 237 begin_msg "Removing old VirtualBox pci kernel module" … … 262 254 succ_msg 263 255 fi 264 if [ -n "$DKMS" ]; then 265 begin_msg "Trying to register the VirtualBox kernel modules using DKMS" 266 if ! $DODKMS install vboxhost $VERSION >> $LOG; then 267 fail_msg "Failed, trying without DKMS" 268 DKMS="" 269 fi 270 fi 271 if [ -z "$DKMS" ]; then 272 begin_msg "Recompiling VirtualBox kernel modules" 273 if ! $BUILDINTMP \ 274 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 275 --module-source "$MODULE_SRC/vboxdrv" \ 276 --no-print-directory install >> $LOG 2>&1; then 277 failure "Look at $LOG to find out what went wrong" 278 fi 279 if ! $BUILDINTMP \ 280 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 281 --module-source "$MODULE_SRC/vboxnetflt" \ 282 --no-print-directory install >> $LOG 2>&1; then 283 failure "Look at $LOG to find out what went wrong" 284 fi 285 if ! $BUILDINTMP \ 286 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 287 --module-source "$MODULE_SRC/vboxnetadp" \ 288 --no-print-directory install >> $LOG 2>&1; then 289 failure "Look at $LOG to find out what went wrong" 290 fi 291 if ! $BUILDINTMP \ 292 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 293 --module-source "$MODULE_SRC/vboxpci" \ 294 --no-print-directory install >> $LOG 2>&1; then 295 failure "Look at $LOG to find out what went wrong" 296 fi 256 begin_msg "Recompiling VirtualBox kernel modules" 257 if ! $BUILDINTMP \ 258 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 259 --module-source "$MODULE_SRC/vboxdrv" \ 260 --no-print-directory install >> $LOG 2>&1; then 261 failure "Look at $LOG to find out what went wrong" 262 fi 263 if ! $BUILDINTMP \ 264 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 265 --module-source "$MODULE_SRC/vboxnetflt" \ 266 --no-print-directory install >> $LOG 2>&1; then 267 failure "Look at $LOG to find out what went wrong" 268 fi 269 if ! $BUILDINTMP \ 270 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 271 --module-source "$MODULE_SRC/vboxnetadp" \ 272 --no-print-directory install >> $LOG 2>&1; then 273 failure "Look at $LOG to find out what went wrong" 274 fi 275 if ! $BUILDINTMP \ 276 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 277 --module-source "$MODULE_SRC/vboxpci" \ 278 --no-print-directory install >> $LOG 2>&1; then 279 failure "Look at $LOG to find out what went wrong" 297 280 fi 298 281 rm -f /etc/vbox/module_not_compiled
Note:
See TracChangeset
for help on using the changeset viewer.