NetBSD-Bugs archive

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

Re: bin/41662: continuation lines in ifconfig.xxN don't work anymore



The following reply was made to PR bin/41662; it has been noted by GNATS.

From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/41662: continuation lines in ifconfig.xxN don't work
        anymore
Date: Fri, 3 Jul 2009 11:29:06 +0200

 On Wed, 01 Jul 2009, bad%bsd.de@localhost wrote:
 > >Fix:
 >      
 > revert the following (gratuitious?) part of rev. 1.54:
 
 The use of backslashes for line continuation is obviously useful,
 and we should support it.  However, that usage was not documented in
 ifconfig.if(5), and I didn't think of it when I was making the changes
 in revision 1.54 of src/etc/rc.d/network.
 
 Changing "read args" to "read -r args" was intentional, and is part of
 the change in the second bullet of the log message for revision 1.54
 of src/etc/rc.d/network ("Allow shell quoting ..."). For example, you
 should be able to do
 
         ssid 'foo\bar'
 
 to get a backslash in the SSID name, or
 
         ssid foo\ bar
 
 to get a space in the SSID name, as is documented in the current version
 of ifconfig.if(5).  The use of "read args" will break that, requiring
 the user to double those backslashes.
 
 I see two possible fixes:
 
   1) Change the code to use "read" without the "-r" flag.  This will
      make backslash line continuation work as desired, but will require
      all other uses of backslashes to be doubled.  The documentation in
      rc.conf(5) and ifconfig.if(5) will have to be changed to explain
      the requirement for backslashes to be doubled.
 
   2) Change the code to perform its own explicit handling of backslash
      line continuation.  This should be done in a way that continues to
      use "read -r", and does not require all other uses of backslashes
      to be doubled.
 
 I prefer option 2, and I consider option 1's requirement for users
 to double their backslashes to be unfriendly.  In either case, the
 documentation should be updated to mention backslash line continuation.
 
 --apb (Alan Barrett)
 


Home | Main Index | Thread Index | Old Index