Index: unk/debian/postinst
===================================================================
--- /trunk/debian/postinst	(revision 23990)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2006-2007 Sun Microsystems, Inc.
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-LOG="/var/log/vbox-install.log"
-
-# for debconf
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-# remove old cruft
-if [ -f /etc/init.d/vboxdrv.sh ]; then
-  echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
-  rm /etc/init.d/vboxdrv.sh
-  update-rc.d vboxdrv.sh remove >/dev/null
-fi
-if [ -f /etc/init.d/virtualbox ]; then
-  echo "Found old version of /etc/init.d/virtualbox, removing."
-  rm /etc/init.d/virtualbox
-  update-rc.d virtualbox remove >/dev/null
-fi
-if [ -f /etc/vbox/vbox.cfg ]; then
-  echo "Found old version of /etc/vbox/vbox.cfg, removing."
-  rm /etc/vbox/vbox.cfg
-fi
-
-# install udev rule
-if [ -d /etc/udev/rules.d ]; then
-  udev_out=`udevinfo -V 2> /dev/null`
-  udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'`
-  if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then
-    echo 'KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \
-      > /etc/udev/rules.d/60-vboxdrv.rules
-  else
-    echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \
-      > /etc/udev/rules.d/60-vboxdrv.rules
-  fi
-fi
-
-# create users groups
-db_input high virtualbox/group-vboxusers || true
-db_go || true
-addgroup --system vboxusers
-
-if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
-  db_get virtualbox/module-compilation-allowed
-  if [ "$RET" = "false" ]; then
-    cat << EOF
-Unable to find a precompiled module for the current kernel
-though module compilation denied by debconf setting.
-EOF
-  else
-    db_input critical virtualbox/module-compilation-allowed || true
-    db_go || true
-    db_get virtualbox/module-compilation-allowed
-    if [ "$RET" = "true" ]; then
-      # Compile module. Don't show a message box here if everything works well.
-      cat << EOF
-Messages emitted during module compilation will be logged to $LOG.
-EOF
-      rm -f /etc/vbox/module_not_compiled
-      echo "** Compiling vboxdrv" > /var/log/vbox-install.log
-      if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \
-          --save-module-symvers /tmp/vboxdrv-Module.symvers \
-          --no-print-directory KBUILD_VERBOSE= \
-          install >> /var/log/vbox-install.log 2>&1; then
-        db_fset virtualbox/module-compilation-failed seen false
-        db_input critical virtualbox/module-compilation-failed || true
-        db_go || true
-        touch /etc/vbox/module_not_compiled
-        # don't abort the installation!
-      else
-        echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log
-        if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \
-            --use-module-symvers /tmp/vboxdrv-Module.symvers \
-            --no-print-directory KBUILD_VERBOSE= \
-            install >> /var/log/vbox-install.log 2>&1; then
-          db_fset virtualbox/module-compilation-failed seen false
-          db_input critical virtualbox/module-compilation-failed || true
-          db_go || true
-          touch /etc/vbox/module_not_compiled
-          # don't abort the installation!
-        else
-          echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log
-          if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \
-              --use-module-symvers /tmp/vboxdrv-Module.symvers \
-              --no-print-directory KBUILD_VERBOSE= \
-              install >> /var/log/vbox-install.log 2>&1; then
-            db_fset virtualbox/module-compilation-failed seen false
-            db_input critical virtualbox/module-compilation-failed || true
-            db_go || true
-            touch /etc/vbox/module_not_compiled
-            # don't abort the installation!
-          fi
-        fi
-      fi
-      if [ ! -f /etc/vbox/module_not_compiled ]; then
-        # success
-        cat << EOF
-Success!
-EOF
-      fi
-    fi
-  fi
-fi
-
-# There might be an old module active (e.g. manually loaded)
-if lsmod | grep -q "vboxdrv[^_-]"; then
-  /etc/init.d/vboxdrv stop || true
-fi
-
-# The starters need to be Suid root. They drop the privileges before starting
-# the real frontend.
-if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then
-  chmod 4511 /usr/lib/virtualbox/VirtualBox
-fi
-if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then
-  chmod 4511 /usr/lib/virtualbox/VBoxHeadless
-fi
-if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then
-  chmod 4511 /usr/lib/virtualbox/VBoxSDL
-fi
-if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then
-  chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP
-fi
-if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then
-  chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl
-fi
-
-#DEBHELPER#
-
-exit 0
Index: /trunk/debian/postinst.in
===================================================================
--- /trunk/debian/postinst.in	(revision 23991)
+++ /trunk/debian/postinst.in	(revision 23991)
@@ -0,0 +1,179 @@
+#!/bin/sh
+#
+# Copyright (C) 2006-2007 Sun Microsystems, Inc.
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+# we can be called with the following arguments:
+#  configure:         (our version): installing/configuring new version
+#  abort-upgrade:     (old version): upgrading to a new version failed
+#  abort-remove:      (our version): removing this package failed
+#  abort-deconfigure: (our version): error during resolving conflicts
+
+LOG="/var/log/vbox-install.log"
+
+if [ "$1" = "configure" ]; then
+
+  # for debconf
+  . /usr/share/debconf/confmodule
+  db_version 2.0
+
+  # remove old cruft
+  if [ -f /etc/init.d/vboxdrv.sh ]; then
+    echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
+    rm /etc/init.d/vboxdrv.sh
+    update-rc.d vboxdrv.sh remove >/dev/null
+  fi
+  if [ -f /etc/vbox/vbox.cfg ]; then
+    echo "Found old version of /etc/vbox/vbox.cfg, removing."
+    rm /etc/vbox/vbox.cfg
+  fi
+
+  # install udev rule
+  if [ -d /etc/udev/rules.d ]; then
+    udev_call=""
+    udev_app=`which udevadm 2> /dev/null`
+    if [ $? -eq 0 ]; then
+      udev_call="${udev_app} version 2> /dev/null"
+    else
+      udev_app=`which udevinfo 2> /dev/null`
+      if [ $? -eq 0 ]; then
+        udev_call="${udev_app} -V 2> /dev/null"
+      fi
+    fi
+    udev_fix="="
+    if [ "${udev_call}" != "" ]; then
+      udev_out=`${udev_call}`
+      udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'`
+      if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then
+        udev_fix=""
+      fi
+    fi
+    echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \
+      > /etc/udev/rules.d/60-vboxdrv.rules
+  fi
+
+  # create users groups
+  db_input high virtualbox/group-vboxusers || true
+  db_go || true
+  addgroup --system vboxusers || true
+
+  REGISTER_DKMS=1
+  if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
+    db_get virtualbox/module-compilation-allowed
+    if [ "$RET" = "false" ]; then
+      cat << EOF
+Unable to find a precompiled module for the current kernel
+though module compilation denied by debconf setting.
+EOF
+    else
+      db_input critical virtualbox/module-compilation-allowed || true
+      db_go || true
+      db_get virtualbox/module-compilation-allowed
+      if [ "$RET" = "true" ]; then
+        # Compile module. Don't show a message box here if everything works well.
+        cat << EOF
+Messages emitted during module compilation will be logged to $LOG.
+EOF
+        rm -f /etc/vbox/module_not_compiled
+        echo "** Compiling vboxdrv" > /var/log/vbox-install.log
+        if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \
+            --save-module-symvers /tmp/vboxdrv-Module.symvers \
+            --no-print-directory KBUILD_VERBOSE= \
+            install >> /var/log/vbox-install.log 2>&1; then
+          db_fset virtualbox/module-compilation-failed seen false
+          db_input critical virtualbox/module-compilation-failed || true
+          db_go || true
+          touch /etc/vbox/module_not_compiled
+          # don't abort the installation!
+        else
+          echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log
+          if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \
+              --use-module-symvers /tmp/vboxdrv-Module.symvers \
+              --no-print-directory KBUILD_VERBOSE= \
+              install >> /var/log/vbox-install.log 2>&1; then
+            db_fset virtualbox/module-compilation-failed seen false
+            db_input critical virtualbox/module-compilation-failed || true
+            db_go || true
+            touch /etc/vbox/module_not_compiled
+            # don't abort the installation!
+          else
+            echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log
+            if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \
+                --use-module-symvers /tmp/vboxdrv-Module.symvers \
+                --no-print-directory KBUILD_VERBOSE= \
+                install >> /var/log/vbox-install.log 2>&1; then
+              db_fset virtualbox/module-compilation-failed seen false
+              db_input critical virtualbox/module-compilation-failed || true
+              db_go || true
+              touch /etc/vbox/module_not_compiled
+              # don't abort the installation!
+            fi
+          fi
+        fi
+        # cleanup
+        rm -f /tmp/vboxdrv-Module.symvers
+        if [ ! -f /etc/vbox/module_not_compiled ]; then
+          # success
+          cat << EOF
+Success!
+EOF
+          REGISTER_DKMS=
+        fi
+      fi
+    fi
+  fi
+
+  # Register at DKMS. If the modules were built above, they are already registered
+  if [ -n "$REGISTER_DKMS" ]; then
+    DKMS=`which dkms 2>/dev/null`
+    if [ -n "$DKMS" ]; then
+      for m in vboxdrv vboxnetflt vboxnetadp; do
+        $DKMS status -m $m | while read line; do
+          if echo "$line" | grep -q added > /dev/null ||
+             echo "$line" | grep -q built > /dev/null ||
+             echo "$line" | grep -q installed > /dev/null; then
+               v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`
+               $DKMS remove -m $m -v $v --all
+          fi
+        done
+        $DKMS add -m $m -v %VER%
+      done
+    fi
+  fi
+
+  # There might be an old module active (e.g. manually loaded)
+  if lsmod | grep -q "vboxdrv[^_-]"; then
+    /etc/init.d/vboxdrv stop || true
+  fi
+
+  # The starters need to be Suid root. They drop the privileges before starting
+  # the real frontend.
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VirtualBox
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxHeadless
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxSDL
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl
+  fi
+
+fi # $1 = "configure"
+
+#DEBHELPER#
+
+exit 0
Index: /trunk/debian/preinst.in
===================================================================
--- /trunk/debian/preinst.in	(revision 23990)
+++ /trunk/debian/preinst.in	(revision 23991)
@@ -12,41 +12,58 @@
 #
 
-. /usr/share/debconf/confmodule
-db_version 2.0
-db_capb backup
+# we can be called with the following arguments:
+#  install:          (our version): install our version
+#  upgrade:          (our version): upgrade to our version
+#  abort-upgrade:    (old version): upgrade to a new version failed
 
-# check for old installation
-if [ -r /etc/vbox/vbox.cfg ]; then
-  . /etc/vbox/vbox.cfg
-  if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
-    db_fset virtualbox/old-installation-found seen false || true
-    db_input high virtualbox/old-installation-found || true
+if [ "$1" = "install" -o "$1" = "upgrade" ]; then
+
+  . /usr/share/debconf/confmodule
+  db_version 2.0
+  db_capb backup
+
+  # check for active VMs
+  if pidof VBoxSVC > /dev/null 2>&1; then
+    db_fset virtualbox/old-running seen false || true
+    db_input high virtualbox/old-running || true
     db_go || true
     exit 1
   fi
-  # we will remove that file in postinst
-fi
 
-# check for old vboxdrv modules
-if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
-  # old modules found
-  db_get virtualbox/delete-old-modules || true
-  if [ "$RET" = "false" ]; then
-    cat << EOF
+  # check for old installation
+  if [ -r /etc/vbox/vbox.cfg ]; then
+    . /etc/vbox/vbox.cfg
+    if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
+      db_fset virtualbox/old-installation-found seen false || true
+      db_input high virtualbox/old-installation-found || true
+      db_go || true
+      exit 1
+    fi
+    # we will remove that file in postinst
+  fi
+
+  # check for old vboxdrv modules
+  if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
+    # old modules found
+    db_get virtualbox/delete-old-modules || true
+    if [ "$RET" = "false" ]; then
+      cat << EOF
 Old vboxdrv kernel modules found in
 EOF
-    find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+  \1+g"
-    cat << EOF
+      find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+  \1+g"
+      cat << EOF
 Removing of these modules denied by debconf setting
 EOF
-  else
-    db_input critical virtualbox/delete-old-modules || true
-    db_go || true
-    db_get virtualbox/delete-old-modules || true
-    if [ "$RET" = "true" ]; then
-      find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+    else
+      db_input critical virtualbox/delete-old-modules || true
+      db_go || true
+      db_get virtualbox/delete-old-modules || true
+      if [ "$RET" = "true" ]; then
+        find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+      fi
     fi
   fi
-fi
+
+fi # "$1" = "install" -o "$1" = "upgrade"
 
 #DEBHELPER#
Index: /trunk/debian/rules
===================================================================
--- /trunk/debian/rules	(revision 23990)
+++ /trunk/debian/rules	(revision 23991)
@@ -71,4 +71,7 @@
 endif
 
+# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
+instmod := $(if $(filter _Ubuntu_karmic _Debian_sid,$(debrel)),,1)
+
 # Locations of custom built Qt libraries (see below)
 qtstdc5  := /home/vbox/Qt-4.4.3-stdc++5-$(arch)
@@ -83,5 +86,5 @@
 	     $(if $(filter _Debian_etch,$(debrel)),$(if $(ose),,--build-libcurl),) \
 	     $(if $(filter _Debian_sarge _xandros4.1 _ucs1.3,$(debrel)),--with-qt4-dir=$(qtstdc5)) \
-	     $(if $(filter _Debian_etch _Ubuntu_dapper _Ubuntu_edgy _Ubuntu_feisty,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
+	     $(if $(filter _Debian_etch _Ubuntu_dapper _Ubuntu_edgy _Ubuntu_feisty _Ubuntu_gutsy _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
 	     $(if $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) \
 	     $(if $(filter _Debian_sarge _Ubuntu_dapper _Ubuntu_edgy _xandros4.1 _ucs1.3,$(debrel)),--disable-pulse,) \
@@ -136,17 +139,17 @@
 	    if [ -L $$d/build ]; then \
 	        make -C $(builddir)/bin/src/vboxdrv KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
-	        make -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all && \
-	        install -D -m 0644 -g 0 -o 0 \
-	            $(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko && \
+	        make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
+	        $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
+	            $(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko); \
 	        make -C $(builddir)/bin/src/vboxnetflt KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
-	        make -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all && \
-	        install -D -m 0644 -g 0 -o 0 \
-	            $(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko; \
+	        make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
+	        $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
+	            $(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko); \
 	        make -C $(builddir)/bin/src/vboxnetadp KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
-	        make -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all && \
-	        install -D -m 0644 -g 0 -o 0 \
-	            $(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko; \
+	        make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
+	        $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
+	            $(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko); \
 	    fi; \
 	done
@@ -159,6 +162,7 @@
 	dh_testdir
 	dh_testroot
+	rm -f debian/preinst debian/postinst
 	rm -f debian/$(package).init debian/vboxdrv.init
-	rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh debian/preinst
+	rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
 	rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
 	rm -rf $(builddir) $(moddir)
@@ -219,10 +223,12 @@
 	mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
 	$(if $(NOMODS),,for d in $(moddir)/*; do \
-	    install -D -g 0 -o 0 -m 0644 \
-		$$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
-	    install -D -g 0 -o 0 -m 0644 \
-		$$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
-	    install -D -g 0 -o 0 -m 0644 \
-		$$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
+	    if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
+	        install -D -g 0 -o 0 -m 0644 \
+		    $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
+	        install -D -g 0 -o 0 -m 0644 \
+		    $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
+	        install -D -g 0 -o 0 -m 0644 \
+		    $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
+	    fi \
 	    done)
 ifeq ($(ose),)
@@ -261,4 +267,5 @@
 	dh_installinit --name=vboxdrv
 	cat debian/preinst.in | sed -e 's|%VER%|$(ver)|g' > debian/preinst
+	cat debian/postinst.in | sed -e 's|%VER%|$(ver)|g' > debian/postinst
 	if [ "$(debrel)" = "_Ubuntu_dapper" -o "$(debrel)" = "_Debian_sarge" ]; then \
 	    cat debian/postrm.dapper > debian/postrm; fi
@@ -293,5 +300,5 @@
 	  -Vpulse=$(if $(HEADLESS),,libpulse0) \
 	  -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \
-	  -Vdkms=$(if $(filter _Ubuntu_gutsy _Ubuntu_hardy _Ubuntu_intrepid _Ubuntu_jaunty,$(debrel)),dkms,)
+	  -Vdkms=$(if $(filter _Ubuntu_gutsy _Ubuntu_hardy _Ubuntu_intrepid _Ubuntu_jaunty _Ubuntu_karmic,$(debrel)),dkms,)
 	dh_md5sums
 	dh_builddeb --destdir $(pkgdir)
Index: /trunk/debian/templates
===================================================================
--- /trunk/debian/templates	(revision 23990)
+++ /trunk/debian/templates	(revision 23991)
@@ -95,2 +95,13 @@
  bevor Sie fortfahren. In der Datei /etc/vbox/vbox.cfg finden Sie das Verzeichnis der alten
  Version. Nachdem Sie diese entfernt haben, können Sie /etc/vbox/vbox.cfg löschen.
+
+Template: virtualbox/old-running
+Type: note
+Description: Running VMs found
+ A copy of VirtualBox is currently running.  Please close it and try again. Please note
+ that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to
+ finish running.
+Description-de.UTF-8: VirtualBox VMs werden ausgeführt
+ Mindestens eine virtuelle Maschine wird noch ausgeführt. Bitte beenden Sie alle VMs und
+ warten Sie 10 Sekunden, bis sich der VBoxSVC-Daemon beendet hat.
+
