LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 11-10-2004, 04:59 PM   #1
coolhand1977
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
Multiple Wans - Auto Config


Distro: Suse 9.2
Nisdiswrapper - Dell 1300 Wireless Mini-PCI Card

I have two wireless networks that I use... one for home and one for work. I have written a very simple script that detects my works routers mac address and chooses what ifcfg to run based on whether or not it finds the Mac address of said router.

Here is the script

check=`/usr/sbin/iwlist wlan0 scanning | grep '00:00:00:00:00:00' | awk '{print $5}'`
if [ $check ]; then
check="1"
else
check="0"
fi

case "$check" in
1)
/sbin/ifup wlan0-work wlan0
;;
0)
/sbin/ifup wlan0-home wlan0
;;
esac

And this works perfectly just type #sh wan, it finds my network and loads the correct wan configuration... however this has to be done as root.

Now my problem is how do I get this to auto run at boot level 3 with root permissions without me doing it manually.

Now I know I just cannot place this in /etc/init.d/ because the kernel will not honor the SUID bit on shell scripts.

I'm looking at writing something like this in perl and using suidperl... or using a wrapper.

I know I'm not the only one with this problem, I just can't help but think that there is a much better way of getting what I need done.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0 config auto ;;;;reboot hermouche Ubuntu 1 09-10-2005 09:35 AM
Auto Switching between multiple KDE Desktops jhisaac1 Linux - General 0 12-09-2004 01:01 PM
Routing multiple subnets to multiple wans raven1000x Linux - Networking 1 03-10-2004 02:29 AM
2 NICs / 2 WANs, 1 dynamic 1 static -- on Slackware 9.1 VioLaToR Linux - Networking 11 03-03-2004 08:53 PM
auto mount multiple windows on boot bax Linux - Software 13 02-23-2003 02:53 PM


All times are GMT -5. The time now is 07:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration