Changeset 57868 in vbox
- Timestamp:
- Sep 23, 2015 12:32:40 PM (9 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 2 edited
-
prerm-common.sh (modified) (3 diffs)
-
rpm/VirtualBox.tmpl.spec (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/prerm-common.sh
r57811 r57868 31 31 . "./routines.sh" 32 32 33 DO_DKMS= 34 VERSION= 35 while true 36 do 37 test -z "${1}" && break 38 case "${1}" in 39 --dkms) 40 DO_DKMS=true 41 shift 42 VERSION="${1}" 43 if test -z "${VERSION}"; then 44 echo "--dkms requires a version" 45 exit 1 46 fi 47 ;; 48 *) 49 echo "Bad argument ${1}" >&2 50 exit 1 51 ;; 52 esac 53 shift 54 done 55 33 56 # Stop the ballon control service 34 57 stop_init_script vboxballoonctrl-service 2>/dev/null … … 37 60 # Stop the web service 38 61 stop_init_script vboxweb-service 2>/dev/null 39 # Do this check here after we terminated the web service 62 # Do this check here after we terminated the web service: check whether VBoxSVC 63 # is running and exit if it can't be stopped. 40 64 check_running 41 65 # Terminate VBoxNetDHCP if running … … 49 73 delrunlevel vboxweb-service 50 74 remove_init_script vboxweb-service 75 DKMS=`which dkms 2>/dev/null` 76 if test "$DO_DKMS" = true && test -n "$DKMS"; then 77 $DKMS remove -m vboxhost -v "${VERSION}" --all > /dev/null 2>&1 78 $DKMS remove -m vboxdrv -v "${VERSION}" --all > /dev/null 2>&1 79 $DKMS remove -m vboxnetflt -v "${VERSION}" --all > /dev/null 2>&1 80 $DKMS remove -m vboxnetadp -v "${VERSION}" --all > /dev/null 2>&1 81 fi 51 82 # Stop kernel module and uninstall runlevel script 52 83 stop_init_script vboxdrv 2>/dev/null -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r57812 r57868 321 321 /sbin/rcvboxdrv stop || true 322 322 fi 323 if [ $REGISTER_MODULES -eq 1 ]; then324 DKMS=`which dkms 2>/dev/null`325 if [ -n "$DKMS" ]; then326 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true327 fi328 fi329 323 fi 330 324 # Install and start the new service scripts. 331 /usr/lib/virtualbox/prerm-common.sh 332 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox --start > /dev/null 325 PRERM_DKMS= 326 test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%" 327 POSTINST_START=--start 328 test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START= 329 /usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS} || true 330 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true 333 331 334 332 335 333 %preun 334 # Called before the package is removed, or during upgrade after (not before) 335 # the new version's "post" scriptlet. 336 336 # $1==0: remove the last version of the package 337 # $1==1: install the first time 338 # $1>=2: upgrade 337 # $1>=1: upgrade 339 338 if [ "$1" = 0 ]; then 340 /usr/lib/virtualbox/prerm-common.sh || exit 1339 /usr/lib/virtualbox/prerm-common.sh --dkms || exit 1 341 340 rm -f /etc/udev/rules.d/60-vboxdrv.rules 342 341 rm -f /etc/vbox/license_agreed 343 342 rm -f /etc/vbox/module_not_compiled 344 343 fi 345 DKMS=`which dkms 2>/dev/null`346 if [ -n "$DKMS" ]; then347 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true348 fi349 350 344 351 345 %postun
Note:
See TracChangeset
for help on using the changeset viewer.

