Sponsored Content
Top Forums Shell Programming and Scripting FreeBSD rc.subr wireless script Post 302657385 by bakunin on Sunday 17th of June 2012 11:51:13 AM
Old 06-17-2012
First off, let me congratulate you: this is by far the best first posting i have read here for ages. You even seem to understand how to use CODE-tags, which will earn you the eternal respect and heartfelt thankfulness of the complete moderation team.

Quote:
Originally Posted by regexp
Is this ok? Is there a better way ?
This is OK. In fact, start-/stop-scripts have been written this way for a long time.

Just as a suggestion, you might want to add a "restart" function, which simply consists of a call to "stop()" first and then a call to "start()".

Another suggestion: do you really want to hard-code the IP address into a rc-script? You might want to make the script more generic by obtaining the IP-address in its own script. This would either read it from some configuration file or get it via DHCP, bootp or the like.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. HP-UX

Wireless

Can someone please point me in the correct direction for setting up a wireless card using HP-UX 11iV1? I know its different depending on the type of card I have, but im looking for a direction. Thanks! (0 Replies)
Discussion started by: nickwinnie
0 Replies

2. BSD

OpenBSD and wireless

I've just installed OpenBSD on my laptop (IBM Thinkpad T42) and since this is my first time with wireless networking in OpenBSD I'm a bit lost. What I would like to do is connect to a wireless network using WEP or WPA. Where do I place the key and essid? (3 Replies)
Discussion started by: Timmy66
3 Replies

3. BSD

FreeBSD Wireless - Can do WPA but not WEP or even open

Hello, I am using FreeBSD on my laptop (R60) and currently it is working great, however, I am having trouble connecting to open or WEP secured networks. I have read the FreeBSD handbook regarding this many times. That is how I found out how to connect to WPA networks. If anyone could post a... (4 Replies)
Discussion started by: kpedersen
4 Replies

4. Shell Programming and Scripting

My Wireless Script Wont Work.....anyone??

ive been trying to write a simple (at least i thought it was) script to launch my wireless usb under ubuntu with kde. im using nano. when i run it from a terminal it works fine, but it just wont run from the script. there is a caveat, but first heres the script. ... (7 Replies)
Discussion started by: braze
7 Replies

5. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

6. Linux

how to configure wireless now ?

Hi, I've installed wireless card and I didn't receive any error in the installation process. Now I want to use it but I can't make internet to work. if I check my card with iwconfig I get the following message wlan0 IEEE 802.11g ESSID:"Alice-34376718" Mode:Managed ... (2 Replies)
Discussion started by: aneuryzma
2 Replies

7. Shell Programming and Scripting

FreeBSD new user login script

I am a beginner programmer and would like to know where to start to modify the login process so that a user can login as username new password new and have it prompt user for username and password and nothing else and then create said user account on the system so they can ssh back in and login... (9 Replies)
Discussion started by: deshi
9 Replies

8. UNIX for Dummies Questions & Answers

'awk' help for script to clean out wireless.

I've been working on a script to clean out the wireless connections on my MAC. I know the terminal command to do this (that part is not rocket science ;) ) So I thought I would have a go at automating this but I'm having trouble with the 'awk' command & the correct context. My code is := ... (7 Replies)
Discussion started by: Lord Lien
7 Replies

9. BSD

An installation script on freeBSD

Hello So i got my hands on some freebsd iso, installed it in a qcow2 image and installled git and bash. So far, so good. Git repositry retireved install script executed files got copied files have exec flag files are in $PATH / found by which / bash-completion works But still,... (3 Replies)
Discussion started by: sea
3 Replies

10. Programming

Changing script to work with freeBSD

hi all, i have made my machine a freeBSD machine instead of a centos machine and my script doesnt work anymore and i was wondering if anyone can help me into why, i thought the commands are the same, here it is - #!/bin/bash source=/vol/cha-work/_ARCHIVE/to_be_archived/audio... (9 Replies)
Discussion started by: robertkwild
9 Replies
IFCFG(5)						       Network configuration							  IFCFG(5)

NAME
ifcfg-wireless - wireless LAN network interface configuration SYNOPSIS
/etc/sysconfig/network/ifcfg-wlan-* /etc/sysconfig/network/ifcfg-type-wlan GENERAL
Wireless networks need some additional configuration data compared to ethernet ones. Therefore additional variables for ifcfg files were introduced. All wireless LAN specific variables are described in the ifcfg template file /etc/sysconfig/network/ifcfg.template. It is pos- sible to configure more than one wireless network accepted for association. To achieve this add suffix _1 to all wireless variables for the second network, _2 for the this, and so on. Example: WIRELESS_ESSID_1="second_net" You can have up to ten wireless networks configured. Some wireless variables are not applicable to a single wireless network but are global to the interface. The description of the variable points this out. BUGS
Please report bugs at <http://www.suse.de/feedback> AUTHOR
Christian Zoz <zoz@suse.de> -- ifup script Michal Svec <msvec@suse.cz> -- ifup script Bjoern Jacke -- ifup script Mads Martin Joergensen <mmj@suse.de> -- ifup manual page Michal Ludvig <mludvig@suse.cz> -- tunnel support Joachim Gleissner <jg@suse.de> -- wireless support SEE ALSO
ifup(8). sysconfig December 2005 IFCFG(5)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy