[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#371876: marked as done (pppoeconf: more robust handling of /etc/network/interfaces)



Your message dated Mon, 24 Jul 2006 03:24:36 -0700
with message-id <E1G4xc4-0002UV-4h@spohr.debian.org>
and subject line Bug#371876: fixed in pppoeconf 1.11
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: pppoeconf
Version: 1.10
Severity: wishlist
Tags: patch

#334361 caused pppoeconf to make an invalid /etc/network/interfaces in
certain cases. I submitted two patches, one fixing the bug, and one to
take precautions against similar bugs being reintroduced, or even
already existing. The first patch was the applied, so I suggest applying the other patch I am attaching, though only after review.
--- /usr/sbin/pppoeconf	2006-06-02 21:20:03.000000000 -0400
+++ pppoeconf	2006-06-07 22:21:27.000000000 -0400
@@ -7,7 +7,7 @@
 export TEXTDOMAINDIR="/usr/share/locale"
 export TEXTDOMAIN=pppoeconf
 export OPTSFILE="/etc/ppp/peers/dsl-provider"
-export INTFILE="/etc/network/interfaces"
+export REALINTFILE="/etc/network/interfaces"
 
 # IMPORTANT: Do not use gdialog unless it has been fixed!
 DIALOG=whiptail
@@ -82,23 +82,6 @@
 chmod 0640 $OPTSFILE
 chown root:dip $OPTSFILE
 
-if ! grep -q "dsl-provider" $INTFILE ; then
-   printf '\niface dsl-provider inet ppp\nprovider dsl-provider\n' >> $INTFILE
-fi
-
-# old crap, unreliable, does not work after reboot
-# if ! grep -q "line maintained by pppoeconf" $INTFILE ; then
-#    sed -i -e 's,provider dsl-provider$,     provider dsl-provider\n# please do not modify the following line\n     pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf\n,' $INTFILE
-# fi
-   
-umask 177
-# make a secure directory
-TMP="`mktemp -d -p /etc/ppp`"
-export TMP
-sectempfile="`mktemp -p $TMP`"
-export sectempfile
-trap "rm -rf '$TMP'" 0 HUP INT TRAP TERM
-
 gettext '
 Most providers send the needed login information per mail. Some providers describe it in odd ways, assuming the user to input the data in their "user-friendly" setup programs. But in fact, these applications generate usuall PPP user names and passwords from the entered data. You can find the real names too and input the correct data in the dialog box.
 
@@ -188,6 +171,23 @@
       exit 1
       ;;
    esac
+
+   INTFILE="`mktemp -t interfaces.pppoeconf.XXXXXX`" || exit 1
+   export INTFILE
+   cp $REALINTFILE $INTFILE
+
+   if ! grep -q "dsl-provider" $INTFILE ; then
+      printf '\niface dsl-provider inet ppp\nprovider dsl-provider\n' >> $INTFILE
+   fi
+
+   umask 177
+   # make a secure directory
+   TMP="`mktemp -d -p /etc/ppp`"
+   export TMP
+   sectempfile="`mktemp -p $TMP`"
+   export sectempfile
+   trap "rm -rf '$TMP'" 0 HUP INT TRAP TERM
+
    # now, execute an AC lookup on each interface
    for mmm in '' ' -U ' ; do
       for iface in $list; do
@@ -408,7 +408,24 @@
   
   # end of story
   rm -rf "$TMP"
-  
+  chmod --reference=$REALINTFILE $INTFILE
+  # check that final file is valid or original one was already invalid. otherwise ask what to do
+  ifup -nai $INTFILE 2>/dev/null
+  if test "$?" = "1" &&  (ifup -na 2>/dev/null; test "$?" = "0"); then
+    title='ERROR'
+    text="The interfaces file generated by pppoeconf appears to be invalid. This is probably because pppoeconf is unable to handle your original interfaces files. Should pppoeconf nevertheless change your interfaces file with the one that appears to be invalid?
+Answering Yes will probably break your network connectivity after rebooting, and cause some local problems if lo is down. Your original interfaces file will be moved to $REALINTFILE~ so you can restore it.
+Answering No means you will have to make sure that $iface is configured before starting your DSL connection and start the connection manually.
+
+Note that this situation is not expected and you should consider submitting a bug report against pppoeconf including your original interfaces files and the one generated by pppoeconf."
+    $DIALOG --title "$title" --clear --defaultno --yesno "$text" 20 75
+    if test "$?" = "0"; then
+      mv -b $INTFILE $REALINTFILE
+    fi
+  else
+    mv $INTFILE $REALINTFILE
+  fi
+
   title=$(gettext 'ESTABLISH A CONNECTION')
   text=$(gettext 'Now, you can make a DSL connection with "pon dsl-provider" and terminate it with "poff". Would you like to start the connection now?')
   $DIALOG --title "$title" --clear --yesno "$text" 15 60

--- End Message ---
--- Begin Message ---
Source: pppoeconf
Source-Version: 1.11

We believe that the bug you reported is fixed in the latest version of
pppoeconf, which is due to be installed in the Debian FTP archive:

pppoeconf_1.11.dsc
  to pool/main/p/pppoeconf/pppoeconf_1.11.dsc
pppoeconf_1.11.tar.gz
  to pool/main/p/pppoeconf/pppoeconf_1.11.tar.gz
pppoeconf_1.11_all.deb
  to pool/main/p/pppoeconf/pppoeconf_1.11_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 371876@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gregory Colpart (evolix) <reg@evolix.fr> (supplier of updated pppoeconf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 24 Jul 2006 00:36:58 +0200
Source: pppoeconf
Binary: pppoeconf
Architecture: source all
Version: 1.11
Distribution: unstable
Urgency: low
Maintainer: Gregory Colpart (evolix) <reg@evolix.fr>
Changed-By: Gregory Colpart (evolix) <reg@evolix.fr>
Description: 
 pppoeconf  - configures PPPoE/ADSL connections
Closes: 169684 299451 315166 319285 330421 371876 374561
Changes: 
 pppoeconf (1.11) unstable; urgency=low
 .
   * New maintainer (Closes: #330421)
   * Add notice for PADO packets timeout in README.Debian (Closes: #299451)
   * Add '-t mangle' for TCPMSS iptables rule (Closes: #315166)
   * Remove usepeerdns in default file (Closes: #319285)
   * Add notice for ppp persistent connections in README.Debian (Closes: #169684)
   * Apply patch to ensure valid interfaces file. Thanks to Filipus Klutiero
     <cheal@hotpop.com>. (Closes: #371876)
   * Update fr.po (Closes: #374561)
   * Delete useless 000usepeerdns script.
   * Import patch from Ubuntu (1.10ubuntu2 version)
   * remove broken support of zenity
   * fix bug with namehelp.txt (unable to display if created too soon)
   * add dh_testroot in debian/rules
Files: 
 8095ee5c696fb32ed40f040786956017 564 net optional pppoeconf_1.11.dsc
 ffca39dd04b1d9efa632c6b4a062dc05 44900 net optional pppoeconf_1.11.tar.gz
 104101253b97529491193f5aec67a41f 43856 net optional pppoeconf_1.11_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFExHTcvGr7W6HudhwRAo2BAJ982L2WrFp2KayQnHuxIG95G6/gjQCfXpWh
lBLlwqS5xpJe8s8uCRjRKIY=
=ReKx
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: