[CFR] rc.conf interface description
Devin Teske
dteske at vicor.com
Mon Jun 13 15:56:33 UTC 2011
> -----Original Message-----
> From: owner-freebsd-rc at freebsd.org [mailto:owner-freebsd-rc at freebsd.org]
> On Behalf Of Hiroki Sato
> Sent: Saturday, June 11, 2011 10:45 PM
> To: melifaro at ipfw.ru
> Cc: dougb at FreeBSD.org; pluknet at gmail.com; freebsd-rc at FreeBSD.org
> Subject: Re: [CFR] rc.conf interface description
>
> "Alexander V. Chernikov" <melifaro at ipfw.ru> wrote
> in <4DF43813.5020508 at ipfw.ru>:
>
> me> -----BEGIN PGP SIGNED MESSAGE-----
> me> Hash: SHA1
> me>
> me> Hiroki Sato wrote:
> me> > Sergey Kandaurov <pluknet at gmail.com> wrote
> me> > in <BANLkTikfoQtgVv2Vnkg6Fn4kq68qjqpWRw at 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 at 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.
_____________
More information about the freebsd-rc
mailing list