Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2011 20:03:15 +0400
From:      "Alexander V. Chernikov" <melifaro@ipfw.ru>
To:        Devin Teske <dteske@vicor.com>
Cc:        dougb@FreeBSD.org, 'Hiroki Sato' <hrs@FreeBSD.org>, freebsd-rc@FreeBSD.org, pluknet@gmail.com
Subject:   Re: [CFR] rc.conf interface description
Message-ID:  <4DF634C3.6020201@ipfw.ru>
In-Reply-To: <46679FEE6B76484CB679F123905ABF93@shxd.ath.cx>
References:  <BANLkTikfoQtgVv2Vnkg6Fn4kq68qjqpWRw@mail.gmail.com><20110612.055610.725598761140735688.hrs@allbsd.org><4DF43813.5020508@ipfw.ru> <20110612.144507.1094074416533508207.hrs@allbsd.org> <46679FEE6B76484CB679F123905ABF93@shxd.ath.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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" <melifaro@ipfw.ru> wrote
>>   in <4DF43813.5020508@ipfw.ru>:
>>
>> me> -----BEGIN PGP SIGNED MESSAGE-----
>> me> Hash: SHA1
>> me>
>> me> Hiroki Sato wrote:
>> me> > Sergey Kandaurov <pluknet@gmail.com> wrote
>> me> >   in <BANLkTikfoQtgVv2Vnkg6Fn4kq68qjqpWRw@mail.gmail.com>:
>> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DF634C3.6020201>