--- ifupdown-scripts-zg2-0.3.orig/debian/changelog
+++ ifupdown-scripts-zg2-0.3/debian/changelog
@@ -1,3 +1,35 @@
+ifupdown-scripts-zg2 (0.3-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Use bash for ifupdown-scripts-zg2.d/vlan too. Thanks to Joerg Friedrich.
+    Closes: #605232
+
+ -- Didier Raboud <didier@raboud.com>  Mon, 29 Nov 2010 11:33:31 +0100
+
+ifupdown-scripts-zg2 (0.3-4) unstable; urgency=low
+
+  * remove debian/ifupdown-scripts-zg2.dirs which still created
+    /var/lib/ifupown-scripts-zg2. Thanks to Mika Prokop. Closes: #530640
+
+ -- Marc Haber <mh+debian-packages@zugschlus.de>  Sun, 31 May 2009 09:02:44 +0200
+
+ifupdown-scripts-zg2 (0.3-3) unstable; urgency=low
+
+  * fix bug in migration code: make sure that
+    /etc/network/run/ifupdown-scripts-zg2 aktually exists before we move
+    files there. Thanks to Andras Barth. Closes: #529887
+
+ -- Marc Haber <mh+debian-packages@zugschlus.de>  Fri, 22 May 2009 20:26:32 +0200
+
+ifupdown-scripts-zg2 (0.3-2) unstable; urgency=low
+
+  * move statedir check from postinst to avoid ifupdown pre-depends.
+    Thanks to Mika Prokop.
+  * do statedir check without /usr.
+  * add vlan to Suggests:
+
+ -- Marc Haber <mh+debian-packages@zugschlus.de>  Sat, 25 Apr 2009 08:12:50 +0200
+
 ifupdown-scripts-zg2 (0.3-1) unstable; urgency=low
 
   * move ATM support to examples, I do not use ATM any more and cannot
--- ifupdown-scripts-zg2-0.3.orig/debian/control
+++ ifupdown-scripts-zg2-0.3/debian/control
@@ -9,6 +9,7 @@
 Package: ifupdown-scripts-zg2
 Architecture: all
 Depends: ${misc:Depends}, ifupdown (>= 0.6.7), iproute, debianutils (>= 1.6)
+Suggests: vlan
 Provides: ifupdown-scripts
 Description: Zugschlus' interface scripts for ifupdown's manual method
  This package contains a set of scripts that are called by ifupdown.
--- ifupdown-scripts-zg2-0.3.orig/debian/ifupdown-scripts-zg2.postinst
+++ ifupdown-scripts-zg2-0.3/debian/ifupdown-scripts-zg2.postinst
@@ -5,29 +5,21 @@
 [ -n "$IUDSZG2DEBUG" ] && set -x
 
 STATEPDIR="/etc/network/run"
-STATEDIR="$STATEDIR/ifupdown-scripts-zg2"
+STATEDIR="$STATEPDIR/ifupdown-scripts-zg2"
 OLDSTATEDIR="/var/lib/ifupdown-scripts-zg2"
 
 if [ "$1" = "configure" ]; then
         update-ifupdown-scripts-zg2.d-symlinks
 	
-	# we should be doing this check in the scripts themselves, but
-        # since they might run early, we can't. So at least do it here.
-	if [ "$STATEPDIR/" != "$(find $STATEPDIR/ -mindepth 0 -maxdepth 0 -type d -and -user root -and -group root -and -not -perm +0022)" ]; then
-    		echo >&2 "ERR: $STATEPDIR isn't a directory, or is writeable by non-root user"
-		exit 1
-	fi
-	umask 022
-	if ! mkdir -p $STATEDIR; then
-    		echo >&2 "ERR: could not mkdir $STATEDIR"
-		exit 1
-        fi
-	if [ "$STATEDIR/" != "$(find $STATEDIR/ -mindepth 0 -maxdepth 0 -type d -and -user root -and -group root -and -not -perm +0022)" ]; then
-    		echo >&2 "ERR: $STATEDIR isn't a directory, or is writeable by non-root user"
-		exit 1
-	fi
 	if [ -d "$OLDSTATEDIR" ]; then
 		# OLDSTATEDIR stll exists, migrate state files from there
+		if ! [ -d "$STATEPDIR" ]; then
+		    echo >&2 "ERR: missing $STATEPDIR. Is ifupdown configured?"
+		    exit 1
+		fi
+
+                [ -d "$STATEDIR" ] || mkdir -m 755 "$STATEDIR"
+
 		for file in $(ls ${OLDSTATEDIR}/*.state 2>/dev/null); do
 			if ! [ -e "$STATEDIR/$(basename $file)" ]; then
 				mv "$file" "$STATEDIR/$(basename $file)"
@@ -41,7 +33,7 @@
 			echo >&2 "ERR: $OLDSTATEDIR not empty."
 			exit 1
 		fi
-		rmdir $OLDSTATEDIR
+		rmdir "$OLDSTATEDIR"
 	fi
 fi
 
