Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Delaying net.ath0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 708
Location: Billings, MT, USA

PostPosted: Sun Jun 08, 2008 3:44 am    Post subject: Delaying net.ath0 Reply with quote

For some reason, whenever net.ath0 starts before any of the other devices, it locks up solid..

But, whenever I manually do it:
Code:
(example)
iwconfig ath0 essid whatever channel 2 mode master
ifconfig ath0 10.23.45.1 netmask 255.255.255.0
ifconfig ath0 up

It works fine.. Is there a way to run this after EVERYTHING else is fired up?
Back to top
View user's profile Send private message
Maliwik
Apprentice
Apprentice


Joined: 14 Apr 2008
Posts: 252
Location: Wisconsin, U.S. of A.

PostPosted: Sun Jun 08, 2008 3:50 am    Post subject: Reply with quote

You could always create a local script, make it executable, and put the script in the /etc/conf.d/local.start file. Then it would be the last thing to start up.
_________________
freelight wrote:
I have a severe case of procrastinitis.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 708
Location: Billings, MT, USA

PostPosted: Sun Jun 08, 2008 3:59 am    Post subject: Reply with quote

I'm a little new to this (the scripting part).. How do you set one up?
Back to top
View user's profile Send private message
Maliwik
Apprentice
Apprentice


Joined: 14 Apr 2008
Posts: 252
Location: Wisconsin, U.S. of A.

PostPosted: Sun Jun 08, 2008 4:16 pm    Post subject: Reply with quote

Well, I'll give you a little example that I've used it for. As of right now, I have two net interfaces: net.eth0 and net.wlan0. net.eth0 is my ethernet LAN port and net.wlan0 is my wireless card. I can't have my ethernet port running at the same time that my wireless is (or else I can't connect to the internet). This is only for the time being as I plan to fix this in the future.

So for the time being, I created a directory named /etc/userscripts and created a file in there called lanstop. The contents of /etc/userscripts/lanstop are this:
Code:
#!/bin/bash
ifconfig eth0 down
echo "Shutting down LAN interface eth0 (Re-enable for use) ..."


I then typed chmod +x /etc/userscripts/lanstop to make it executable. I then went to my /etc/conf.d/local.start file and put this line in it:
Code:
/etc/userscripts/lanstop


Now, whenever I start the computer up, right after the "Starting local ..." line at the bottom of the boot process it shows:
Quote:
Shutting down LAN interface eth0 (Re-enable for use) ...


I even took it a step further for ease of use and copied /etc/userscripts/lanstop over to /usr/bin and now anyone can run the command lanstop as long as they have the privileges to run what's inside the script. I also made one called lanstart and put it in /usr/bin that does the opposite.

These are very simple scripts, but you should be able to do what it is you're trying to do just with this.

-- Mike
_________________
freelight wrote:
I have a severe case of procrastinitis.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum