From owner-freebsd-rc@FreeBSD.ORG Sun Jun 12 05:45:43 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 2220C106564A; Sun, 12 Jun 2011 05:45:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.vlsi.ee.noda.tus.ac.jp (sekine00.ee.noda.sut.ac.jp [133.31.107.40]) by mx1.freebsd.org (Postfix) with ESMTP id D06818FC08; Sun, 12 Jun 2011 05:45:42 +0000 (UTC) Received: from alph.allbsd.org (p2237-ipbf904funabasi.chiba.ocn.ne.jp [122.26.37.237]) (user=hrs mech=DIGEST-MD5 bits=128) by mail.vlsi.ee.noda.tus.ac.jp (8.14.4/8.14.4) with ESMTP id p5C5jRD6048447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Jun 2011 14:45:37 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id p5C5jPcL048399; Sun, 12 Jun 2011 14:45:27 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 12 Jun 2011 14:45:07 +0900 (JST) Message-Id: <20110612.144507.1094074416533508207.hrs@allbsd.org> To: melifaro@ipfw.ru From: Hiroki Sato In-Reply-To: <4DF43813.5020508@ipfw.ru> References: <20110612.055610.725598761140735688.hrs@allbsd.org> <4DF43813.5020508@ipfw.ru> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Sun_Jun_12_14_45_07_2011_678)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.5 (mail.vlsi.ee.noda.tus.ac.jp [133.31.107.40]); Sun, 12 Jun 2011 14:45:38 +0900 (JST) X-Spam-Status: No, score=6.3 required=14.0 tests=BAYES_50, CONTENT_TYPE_PRESENT, QENCPTR1,RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,X_MAILER_PRESENT autolearn=no version=3.3.1 X-Spam-Level: ****** X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.vlsi.ee.noda.tus.ac.jp Cc: dougb@FreeBSD.org, pluknet@gmail.com, freebsd-rc@FreeBSD.org 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: Sun, 12 Jun 2011 05:45:43 -0000 ----Security_Multipart0(Sun_Jun_12_14_45_07_2011_678)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Jun_12_14_45_07_2011_590)--" Content-Transfer-Encoding: 7bit ----Next_Part(Sun_Jun_12_14_45_07_2011_590)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "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. -- Hiroki ----Next_Part(Sun_Jun_12_14_45_07_2011_590)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr_20110612-1.diff" Index: etc/network.subr =================================================================== --- etc/network.subr (revision 222996) +++ etc/network.subr (working copy) @@ -94,7 +94,7 @@ # ifconfig_IF ifconfig_args=`ifconfig_getargs $1` if [ -n "${ifconfig_args}" ]; then - ifconfig $1 ${ifconfig_args} + eval ifconfig $1 ${ifconfig_args} _cfg=0 fi ----Next_Part(Sun_Jun_12_14_45_07_2011_590)---- ----Security_Multipart0(Sun_Jun_12_14_45_07_2011_678)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk30UmMACgkQTyzT2CeTzy2YfQCfbGglKeUfxakzuBBRaol9/xDd lMkAnRW+p6P1Al2GICHmRdNZ3RgdoxQh =qkoA -----END PGP SIGNATURE----- ----Security_Multipart0(Sun_Jun_12_14_45_07_2011_678)----