Package: ifupdown
Version: 0.7.41
Severity: important
Tags: patch

Dear maintainer,

While upgrading ifupdown today I got this:

Setting up ifupdown (0.7.41) ...
/var/lib/dpkg/info/ifupdown.postinst: 102: 
/var/lib/dpkg/info/ifupdown.postinst: Syntax error: "else" unexpected
dpkg: error processing ifupdown (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 ifupdown
E: Sub-process /usr/bin/dpkg returned an error code (1)

where code near line 102 is:

if [ -f /etc/network/interfaces ] ; then
  # We don't need loopback interface definition anymore as
  # ifupdown handles loopback interface on its own from now
else  # ! -f /etc/network/interfaces

This patch fixes it:

--- a/debian/postinst
+++ b/debian/postinst
@@ -96,10 +96,9 @@
 
 # Generic stuff done on all configurations
 if [ "$1" = "configure" ] ; then
-  if [ -f /etc/network/interfaces ] ; then
-    # We don't need loopback interface definition anymore as
-    # ifupdown handles loopback interface on its own from now
-  else  # ! -f /etc/network/interfaces
+  # We don't need loopback interface definition anymore as
+  # ifupdown handles loopback interface on its own from now
+  if [ ! -f /etc/network/interfaces ] ; then
     if [ -z "$2" ]; then
       echo "Creating /etc/network/interfaces."
       echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > 
/etc/network/interfaces


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (700, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ifupdown depends on:
ii  dpkg         1.16.10
ii  initscripts  2.88dsf-41
ii  iproute      20120521-3+b4
ii  libc6        2.17-0experimental2
ii  lsb-base     4.1+Debian9

ifupdown recommends no packages.

Versions of packages ifupdown suggests:
ii  isc-dhcp-client [dhcp-client]  4.2.4-6
ii  net-tools                      1.60-24.2
ii  ppp                            2.4.5-5.1+b1
pn  rdnssd                         <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to