From owner-freebsd-net@FreeBSD.ORG Sat Oct 22 12:38:00 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77EFA1065673 for ; Sat, 22 Oct 2011 12:38:00 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id A4BC58FC13 for ; Sat, 22 Oct 2011 12:37:59 +0000 (UTC) Received: (qmail 2977 invoked from network); 22 Oct 2011 12:11:17 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 22 Oct 2011 12:11:17 -0000 Date: Sat, 22 Oct 2011 14:11:17 +0200 (CEST) Message-Id: <20111022.141117.74664953.sthaug@nethelp.no> To: freebsd-stable@freebsd.org, freebsd-net@freebsd.org From: sthaug@nethelp.no X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: How to set interface description containing space in 8.x X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 12:38:00 -0000 FreeBSD 8.x (well, at least 8.2) has the very nice feature of letting you set an interface *description* (just like you can on any Juniper/ Cisco/whatever router). This decription can contain spaces - so I can do for instance: xxx# ifconfig bge1 descr "abc def" xxx# ifconfig bge1 bge1: flags=8843 metric 0 mtu 1500 description: abc def options=8009b ether 00:13:72:20:b4:6f media: Ethernet autoselect (1000baseT ) status: active and we see that the decription includes a space. The question is - how can I include a description containing one or more spaces in rc.conf? The straighforward attempt, ifconfig_bge1="up descr abc def" doesn't work - "abc" and "def" are given as separate parameters to the ifconfig command, resulting in "abc" being used and "def" regarded as an extra parameter: xxx# /etc/rc.d/netif start bge1 ifconfig: def: bad value I have tried several variants, ifconfig_bge1="up descr abc\ def" ifconfig_bge1="up descr abc\\ def" ifconfig_bge1="up descr 'abc def'" ifconfig_bge1="up descr \"abc def\"" ifconfig_bge1="up descr abc_def" but none have the desired result. Can anybody shed a light on this? Steinar Haug, Nethelp consulting, sthaug@nethelp.no