[Pkg-virtualbox-devel] Bug#466851: Package uninstallable if vboxdrv module does not exist

Chris Lamb chris at chris-lamb.co.uk
Thu Feb 21 13:10:21 UTC 2008


Package: virtualbox-ose
Version: 1.5.4-dfsg-5
Tags: patch

The package is uninstallable if you do not have the 'vboxdrv' kernel
module.

This is caused by "/etc/init.d/virtualbox-ose stop" returning with a
non-zero exit status if the vboxdrv module does not exist:

  case "$1" in
  start)
      # try to insert module but do not fail if not possible
      /sbin/modprobe -q vboxdrv || true
      start
      ;;
  stop)
      stop
      /sbin/modprobe -qr vboxdrv           #### fails
      ;;
  restart)
      restart

Remember that "modprobe -r" returns 0 if you remove a module that exists
(even if it already was unloaded) and will return 1 if you specify a
missing module.

One solution would be to append " || true" to the "modprobe -qr" line.


Regards,

-- 
Chris Lamb, UK                                       chris at chris-lamb.co.uk
                                                            GPG: 0x634F9A20
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20080221/183a9daa/attachment.pgp 


More information about the Pkg-virtualbox-devel mailing list