Debian Bug report logs - #707054
ifupdown: Does not correctly upgrade: Syntax error: "else" unexpected

version graph

Package: ifupdown; Maintainer for ifupdown is Andrew Shadura <andrewsh@debian.org>; Source for ifupdown is src:ifupdown.

Reported by: Dmitry Shachnev <mitya57@gmail.com>

Date: Tue, 7 May 2013 08:03:02 UTC

Severity: serious

Tags: patch, upstream

Merged with 707041, 707048

Found in version ifupdown/0.7.41

Fixed in version ifupdown/0.7.42

Done: Andrew Shadura <andrewsh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Andrew Shadura <andrewsh@debian.org>:
Bug#707054; Package ifupdown. (Tue, 07 May 2013 08:03:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Shachnev <mitya57@gmail.com>:
New Bug report received and forwarded. Copy sent to Andrew Shadura <andrewsh@debian.org>. (Tue, 07 May 2013 08:03:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Dmitry Shachnev <mitya57@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ifupdown: Does not correctly upgrade: Syntax error: "else" unexpected
Date: Tue, 07 May 2013 11:55:16 +0400
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



Severity set to 'serious' from 'important' Request was from Andrew Shadura <andrewsh@debian.org> to control@bugs.debian.org. (Tue, 07 May 2013 08:54:03 GMT) Full text and rfc822 format available.

Marked Bug as done Request was from Andrew Shadura <andrewsh@debian.org> to control@bugs.debian.org. (Tue, 07 May 2013 08:54:04 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Shachnev <mitya57@gmail.com>:
Bug acknowledged by developer. (Tue, 07 May 2013 08:54:06 GMT) Full text and rfc822 format available.

Marked as fixed in versions ifupdown/0.7.42. Request was from Andrew Shadura <andrewsh@debian.org> to control@bugs.debian.org. (Tue, 07 May 2013 08:54:06 GMT) Full text and rfc822 format available.

Added tag(s) upstream. Request was from Andrew Shadura <andrewsh@debian.org> to control@bugs.debian.org. (Tue, 07 May 2013 08:54:07 GMT) Full text and rfc822 format available.

Merged 707041 707048 707054 Request was from Andrew Shadura <andrewsh@debian.org> to control@bugs.debian.org. (Tue, 07 May 2013 08:54:10 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 05 Jun 2013 07:34:33 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 23:30:13 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.