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

next in thread | previous in thread | raw e-mail | index | archive | help


> -----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.
-- 
Devin

_____________

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
_____________



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