From owner-freebsd-questions@FreeBSD.ORG Mon May 14 21:29:04 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CE7D16A404 for ; Mon, 14 May 2007 21:29:04 +0000 (UTC) (envelope-from ccowart@hal.rescomp.berkeley.edu) Received: from rescomp.berkeley.edu (keyserver.Rescomp.Berkeley.EDU [169.229.70.167]) by mx1.freebsd.org (Postfix) with ESMTP id 08D8E13C48A for ; Mon, 14 May 2007 21:29:03 +0000 (UTC) (envelope-from ccowart@hal.rescomp.berkeley.edu) Received: by rescomp.berkeley.edu (Postfix, from userid 1225) id D60F95B764; Mon, 14 May 2007 14:29:03 -0700 (PDT) Date: Mon, 14 May 2007 14:29:03 -0700 From: Christopher Cowart To: Gunther Mayer Message-ID: <20070514212903.GS25685@rescomp.berkeley.edu> Mail-Followup-To: Gunther Mayer , freebsd-questions@freebsd.org References: <4648BC6C.4020609@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f5XwDZYQieeN6n9K" Content-Disposition: inline In-Reply-To: <4648BC6C.4020609@gmail.com> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.9i Cc: freebsd-questions@freebsd.org Subject: Re: Spaces in SSID in /etc/rc.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 21:29:04 -0000 --f5XwDZYQieeN6n9K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 14, 2007 at 09:45:48PM +0200, Gunther Mayer wrote: > Hi there, >=20 > I got a low key server who is wirelessly connected to the net using an=20 > SSID that contains a space. In rc.conf I define the ifconfig line for=20 > configuration of my wireless interface upon bootup, but the entire line= =20 > reads something like >=20 > ifconfig_ath0=3D' inet 192.168.0.1 ssid "my network" ' >=20 > No matter how I tweak the quotes (single then double, other way round,=20 > with lots of \\) I never get my interface to configure properly upon=20 > bootup and I need to get to the console to fix it up. I thought I knew=20 > shell syntax but this is beyond me or manpages... >=20 > What's the right way to do this? One approach would be to navigate the series of function calls defined in /etc/network.subr. I just took a brief look, but it's not immediately obvious how many times you're going to have to escape exactly what to get the behavior you desire. Another option would be to make the file /etc/start_if.ath0, containing the line `ifconfig ... ssid "my network"`. This file would be sourced when /etc/rc.d/netif starts the network interfaces, before the rc variable ifconfig_ath0 is run. You can then omit the variable ifconfig_ath0 from /etc/rc.conf. For more hints, look in /etc/netif, /etc/network.subr, and /etc/rc.subr. --=20 Chris Cowart Lead Systems Administrator Network Infrastructure, RSSP-IT UC Berkeley --f5XwDZYQieeN6n9K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFGSNSfV3SOqjnqPh0RAtdvAJ4x9+KEoIWtH//k6iYFaKUBNJ2NTACfXXWM EW0DYlbiQZYVsiAlqke0dG0= =H14n -----END PGP SIGNATURE----- --f5XwDZYQieeN6n9K--