]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Add safety net to prevent people from using the guest additions.
authorMichael Hanke <michael.hanke@gmail.com>
Wed, 3 Nov 2010 18:31:23 +0000 (14:31 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Wed, 3 Nov 2010 18:32:01 +0000 (14:32 -0400)
debian/changelog
debian/control
debian/neurodebian-guest-additions.preinst [new file with mode: 0644]

index 203ad280a1dc7b5c308b673b2f4e292fa712e401..a84338620d2275115b53d46533d96815213c0e48 100644 (file)
@@ -1,5 +1,5 @@
-neurodebian (0.4) squeeze; urgency=low
+neurodebian (0.5) squeeze; urgency=low
 
   * Initial release.
 
- -- Michael Hanke <michael.hanke@gmail.com>  Wed, 03 Nov 2010 14:08:27 -0400
+ -- Michael Hanke <michael.hanke@gmail.com>  Wed, 03 Nov 2010 14:31:48 -0400
index f8014a777c9372068d356f21927f14e23a68c14a..7ab324a8ba3c9f3f308f6c327841e6f49116039f 100644 (file)
@@ -38,10 +38,10 @@ Description: GnuPG archive keys of the NeuroDebian archive
 
 Package: neurodebian-guest-additions
 Architecture: all
-Depends: ${misc:Depends}, sudo, virtualbox-ose-guest-utils, virtualbox-ose-guest-x11, virtualbox-ose-guest-dkms, neurodebian-desktop, gdm, update-manager-gnome, update-notifier
+Pre-Depends: virtualbox-ose-guest-utils, virtualbox-ose-guest-x11, virtualbox-ose-guest-dkms
+Depends: ${misc:Depends}, sudo, neurodebian-desktop, gdm, update-manager-gnome, update-notifier
 Recommends: chromium-browser
-Suggests:
-Description: add-ons and configuration for the NeuroDebian virtual machine
+Description: NeuroDebian virtual machine guest additions (DO NOT INSTALL)
  This package configures a Debian installation as a guest operating system
  in a VirtualBox-based virtual machine for NeuroDebian.
  .
diff --git a/debian/neurodebian-guest-additions.preinst b/debian/neurodebian-guest-additions.preinst
new file mode 100644 (file)
index 0000000..da7c465
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+
+
+case "$1" in
+    install|upgrade)
+        if [ ! -e /dev/vboxguest ]; then
+            echo "There is no /dev/vboxguest -- this does not seem to be running in a VirtualBox machine. This is not supported."
+            exit 1
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0