Re: Spaces in SSID in /etc/rc.conf
I come across the same problem. and my solution is to use hex instead of normal string. man ifconfig, you will see: ssid ssid Set the desired Service Set Identifier (aka network name). The SSID is a string up to 32 characters in length and may be speci- fied as either a normal string or in hexadecimal when preceded by `0x'. Additionally, the SSID may be cleared by setting it to `-'. If you add the following line to /etc/rc.conf, It will works. ifconfig_ath0 = DHCP ssid 0x6d79206e6574776f726b Hope it helps. 2007/5/20, Gunther Mayer [EMAIL PROTECTED]: Christopher Cowart wrote: On Mon, May 14, 2007 at 09:45:48PM +0200, Gunther Mayer wrote: Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... 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. Thanks for all your ideas guys, I really appreciate the help. Finally got some time to try all of your suggestions, though backwhacking (\) the space and/or the quotes makes no difference so I decided in the end to stop fighting the quoting wars and to just use /etc/start_if.ath0 which works perfectly. Not quite as neat as having everything live in /etc/rc.conf but it does the trick. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Ronggui Huang Department of Sociology, Fudan University, Shanghai, China Department of Public and Social Administration, CityU, HK ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Spaces in SSID in /etc/rc.conf
Christopher Cowart wrote: On Mon, May 14, 2007 at 09:45:48PM +0200, Gunther Mayer wrote: Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... 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. Thanks for all your ideas guys, I really appreciate the help. Finally got some time to try all of your suggestions, though backwhacking (\) the space and/or the quotes makes no difference so I decided in the end to stop fighting the quoting wars and to just use /etc/start_if.ath0 which works perfectly. Not quite as neat as having everything live in /etc/rc.conf but it does the trick. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Spaces in SSID in /etc/rc.conf
Gunther Mayer wrote: Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... What's the right way to do this? I think the right way is to use wpa_supplicant.conf to define wireless networks. Then in your rc.conf you prefix the NIC configuration with WPA like this: ifconfig_ath0==WPA DHCP This method also allows you to define various wireless networks if needed. Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org smime.p7s Description: S/MIME Cryptographic Signature
Spaces in SSID in /etc/rc.conf
Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... What's the right way to do this? Gunther ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Spaces in SSID in /etc/rc.conf
On Mon, May 14, 2007 at 09:45:48PM +0200, Gunther Mayer wrote: Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... 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. -- Chris Cowart Lead Systems Administrator Network Infrastructure, RSSP-IT UC Berkeley signature.asc Description: Digital signature
RE: Spaces in SSID in /etc/rc.conf
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gunther Mayer Sent: Tuesday, 15 May 2007 5:46 AM To: freebsd-questions@freebsd.org Subject: Spaces in SSID in /etc/rc.conf Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... What's the right way to do this? Gunther Have you tried this (I havent, its just a suggestion)... I use this construct to get around scp transfers and the file names windoze users love to create with heaps of spaces... ifconfig_ath0=' inet 192.168.0.1 ssid my\ network ' If there are multiple spaces then you need to slash each one, i.e. ifconfig_ath0=' inet 192.168.0.1 ssid my\ \ network ' Give it a shot ;-) mjt --- The information transmitted in this e-mail is for the exclusive use of the intended addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. E-mails may not be secure, may contain computer viruses and may be corrupted in transmission. Please carefully check this e-mail (and any attachment) accordingly. No warranties are given and no liability is accepted for any loss or damage caused by such matters. --- ### This e-mail message has been scanned for Viruses by Bytecraft ### ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Spaces in SSID in /etc/rc.conf
On Tue, May 15, 2007, Murray Taylor wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gunther Mayer Sent: Tuesday, 15 May 2007 5:46 AM To: freebsd-questions@freebsd.org Subject: Spaces in SSID in /etc/rc.conf Hi there, I got a low key server who is wirelessly connected to the net using an SSID that contains a space. In rc.conf I define the ifconfig line for configuration of my wireless interface upon bootup, but the entire line reads something like ifconfig_ath0=' inet 192.168.0.1 ssid my network ' No matter how I tweak the quotes (single then double, other way round, with lots of \\) I never get my interface to configure properly upon bootup and I need to get to the console to fix it up. I thought I knew shell syntax but this is beyond me or manpages... What's the right way to do this? Gunther Have you tried this (I havent, its just a suggestion)... I use this construct to get around scp transfers and the file names windoze users love to create with heaps of spaces... I would look at the code that uses this as often this type of problems results from multiple expansions of an expression. In this case the variable ifconfig_ath0 is set to ``inet 192.168.0.1 ssid my network'', but that may well be used in an `eval` or some such resulting in multple expansions. Backwhacking the double quotes might help: ifconfig_ath0='inet 192.168.0.1 ssid \my network\' One could always cheat and create a simple script to execute instead of trying to fight the quoting wars. ifconfig_ath0='/usr/local/bin/mynetwork.sh' Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``Never do your enemy a minor injury.'' - Machiavelli ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]