[Pkg-virtualbox-commits] r73 - trunk/debian

daniel at alioth.debian.org daniel at alioth.debian.org
Tue Oct 9 12:51:39 UTC 2007


Author: daniel
Date: 2007-10-09 12:51:39 +0000 (Tue, 09 Oct 2007)
New Revision: 73

Modified:
   trunk/debian/changelog
   trunk/debian/postinst.modules.in
   trunk/debian/virtualbox-ose.postinst
   trunk/debian/virtualbox-ose.postrm
Log:
Cleaned, simplified and refractored postinst.modules.in, virtualbox-ose.postinst and virtualbox-ose.postrm.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-10-09 12:44:22 UTC (rev 72)
+++ trunk/debian/changelog	2007-10-09 12:51:39 UTC (rev 73)
@@ -27,6 +27,8 @@
     in debhelper anyway, see #109642 for more information.
   * Fixed spelling error and improved language in
     virtualbox-ose.README.rebuild.
+  * Cleaned, simplified and refractored postinst.modules.in,
+    virtualbox-ose.postinst and virtualbox-ose.postrm.
 
  -- Daniel Baumann <daniel at debian.org>  Tue,  2 Oct 2007 13:57:00 +0200
 

Modified: trunk/debian/postinst.modules.in
===================================================================
--- trunk/debian/postinst.modules.in	2007-10-09 12:44:22 UTC (rev 72)
+++ trunk/debian/postinst.modules.in	2007-10-09 12:51:39 UTC (rev 73)
@@ -1,20 +1,23 @@
-#!/bin/sh -e
+#!/bin/sh
 
-#DEBHELPER#
+set -e
 
-case "$1" in
-    configure)
-    	modprobe vboxdrv || true
-    	invoke-rc.d udev reload
-	;;
+case "${1}" in
+	configure)
+		modprobe vboxdrv || true
+		invoke-rc.d udev reload
+		;;
 
-    abort-upgrade|abort-deconfigure|abort-remove)
-	;;
+	abort-upgrade|abort-deconfigure|abort-remove)
 
-    *)
-	echo "$0 called with unknown argument \`$1'" 1>&2
-	exit 1
-	;;
+		;;
+
+	*)
+		echo "${0} called with unknown argument \`${1}'" 1>&2
+		exit 1
+		;;
 esac
 
+#DEBHELPER#
+
 exit 0

Modified: trunk/debian/virtualbox-ose.postinst
===================================================================
--- trunk/debian/virtualbox-ose.postinst	2007-10-09 12:44:22 UTC (rev 72)
+++ trunk/debian/virtualbox-ose.postinst	2007-10-09 12:51:39 UTC (rev 73)
@@ -1,26 +1,32 @@
-#!/bin/sh -e
+#!/bin/sh
 
-action="$1"
-oldversion="$2"
+set -e
 
-if [ "$action" != configure ]
-  then
-  exit 0
-fi
+case "${1}" in
+	configure)
+		# Adding vboxusers group
+		if ! getent group vboxusers > /dev/null
+		then
+			addgroup --quiet --system vboxusers
+		fi
 
+		# In case the system is running without inotify tell udev to
+		# reload the rules
+		if [ -x /sbin/udevcontrol ]
+		then
+			/sbin/udevcontrol reload_rules || true
+		fi
+		;;
 
-setup_vboxusers_group() {
-        if ! getent group vboxusers >/dev/null; then
-                addgroup --quiet --system vboxusers
-        fi
-}
+	abort-upgrade|abort-deconfigure|abort-remove)
 
-setup_vboxusers_group
+		;;
 
-# just in case the system is running without inotify tell udev to reload the rules
-if [ -x /sbin/udevcontrol ]; then
-	/sbin/udevcontrol reload_rules || true;
-fi
+	*)
+		echo "${0} called with unknown argument \`${1}'" 1>&2
+		exit 1
+		;;
+esac
 
 #DEBHELPER#
 

Modified: trunk/debian/virtualbox-ose.postrm
===================================================================
--- trunk/debian/virtualbox-ose.postrm	2007-10-09 12:44:22 UTC (rev 72)
+++ trunk/debian/virtualbox-ose.postrm	2007-10-09 12:51:39 UTC (rev 73)
@@ -1,12 +1,23 @@
-#!/bin/sh -e
+#!/bin/sh
 
-action="$1"
-oldversion="$2"
+set -e
 
-if [ "$action" = purge ]; then
-	delgroup --quiet --system vboxusers
-fi
+case "${1}" in
+	purge)
+		# Removing vboxusers group
+		delgroup --quiet --system vboxusers
+		;;
 
+	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+		;;
+
+	*)
+		echo "postrm called with unknown argument \`${1}'" >&2
+		exit 1
+		;;
+esac
+
 #DEBHELPER#
 
 exit 0




More information about the Pkg-virtualbox-commits mailing list