From owner-freebsd-rc@FreeBSD.ORG Mon Jun 13 16:05:04 2011 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F5871065673; Mon, 13 Jun 2011 16:05:04 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from no.spam.no.ddos.ru (no.spam.no.ddos.ru [IPv6:2a02:978:2:1000::3]) by mx1.freebsd.org (Postfix) with ESMTP id C7AB88FC13; Mon, 13 Jun 2011 16:05:03 +0000 (UTC) Received: from ws.su29.net (v6.mpls.in [IPv6:2a02:978:2::5]) by no.spam.no.ddos.ru (Postfix) with ESMTPA id 442683812B6; Mon, 13 Jun 2011 20:03:26 +0400 (MSD) Message-ID: <4DF634C3.6020201@ipfw.ru> Date: Mon, 13 Jun 2011 20:03:15 +0400 From: "Alexander V. Chernikov" User-Agent: Thunderbird 2.0.0.24 (X11/20100515) MIME-Version: 1.0 To: Devin Teske References: <20110612.055610.725598761140735688.hrs@allbsd.org><4DF43813.5020508@ipfw.ru> <20110612.144507.1094074416533508207.hrs@allbsd.org> <46679FEE6B76484CB679F123905ABF93@shxd.ath.cx> In-Reply-To: <46679FEE6B76484CB679F123905ABF93@shxd.ath.cx> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: dougb@FreeBSD.org, 'Hiroki Sato' , freebsd-rc@FreeBSD.org, pluknet@gmail.com Subject: Re: [CFR] rc.conf interface description X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 16:05:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Devin Teske wrote: > >> -----Original Message----- >> From: owner-freebsd-rc@freebsd.org [mailto:owner-freebsd-rc@freebsd.org] >> On Behalf Of Hiroki Sato >> Sent: Saturday, June 11, 2011 10:45 PM >> To: melifaro@ipfw.ru >> Cc: dougb@FreeBSD.org; pluknet@gmail.com; freebsd-rc@FreeBSD.org >> Subject: Re: [CFR] rc.conf interface description >> >> "Alexander V. Chernikov" wrote >> in <4DF43813.5020508@ipfw.ru>: >> >> me> -----BEGIN PGP SIGNED MESSAGE----- >> me> Hash: SHA1 >> me> >> me> Hiroki Sato wrote: >> me> > Sergey Kandaurov wrote >> me> > in : >> me> > >> me> > pl> Hello. >> me> > pl> >> me> > pl> Some time ago there was a discussion about ifconfig descr >> integration >> me> > pl> into rc. That means you can store interface descriptions in >> rc.conf file, >> me> > pl> so that the descriptions survive between system reboots. To >> achieve it, >> me> > pl> you need to place one-line option into rc.conf, e.g. like this: >> me> > pl> ifconfig_em0_descr="Uplink to Gigabit Switch 1", or >> me> > pl> ifconfig_vlan8_descr="description '1 2 3' vlan 255 vlandev >> IFACE" >> me> > pl> >> me> > pl> so after reboot or manual `rc.d/netif restart $iface` >> invocation, you''ll see >> me> > pl> something like this: >> me> > pl> vlan8: flags=8843 metric >> 0 mtu 1500 >> me> > pl> description: description '1 2 3' vlan 255 vlandev IFACE >> me> > pl> [...] >> me> > pl> And rc.d/netif stop $iface removes description from a network >> interface. >> me> > pl> >> me> > pl> You can see the previous discussion in -current@ and -rc@ mail >> archives: >> me> > pl> http://www.mail-archive.com/freebsd- >> current@freebsd.org/msg124513.html >> me> > pl> However, that time it went nowhere due to luck of time/interest. >> me> > pl> >> me> > pl> Recently I learned that this patch is actually used. >> me> > pl> I was requested to integrate it into the head. >> me> > pl> I'd like to collect your opinions/objections/thoughts to ensure >> whether >> me> > pl> there are might be issues preventing from committing it. >> me> > >> me> > I have no strong objection but I am still wondering if we really >> need >> me> > to have the dedicated variable for ifconfig descr. Is simply >> me> > specifying ifconfig_IF="descr FOO" not enough? >> me> >> me> Unfortunately it is not. You can't (easily) set interface description >> me> like 'FOO BAR' via ifconfig_IF. Please see conf/156675 for a bit >> longer >> me> desciption. >> >> If the primary issue is that escape characters do not work properly, >> the attached patch should fix that. >> >> This escape character problem may also involve other options which >> accept white spaces such as group, maclabel, ssid, or wepkey. I >> think this is a bug in the rc.d framework and supporting \ and ' in >> ifconfig_IF is simpler and more intuitive than having an >> ifconfig_IF_xxx line for each. > > +1 to Hiroki's logic. For me the primary issue is problem with character escaping. Single-line interface configuration (not mentioning IPv6) without complex escaping is more preferable than introducing additional line for description -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk32NMMACgkQwcJ4iSZ1q2nTdQCfWDoyFn/6ykoUjvopvYFDZGcw WtoAoIOmw1g0I2vmB7cM5OCy9z7fHh/p =LeaS -----END PGP SIGNATURE-----