View previous topic :: View next topic |
Author |
Message |
Simba7 l33t


Joined: 22 Jan 2007 Posts: 708 Location: Billings, MT, USA
|
Posted: Sun Jun 08, 2008 3:44 am Post subject: Delaying net.ath0 |
|
|
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 |
|
 |
Maliwik Apprentice


Joined: 14 Apr 2008 Posts: 252 Location: Wisconsin, U.S. of A.
|
Posted: Sun Jun 08, 2008 3:50 am Post subject: |
|
|
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 |
|
 |
Simba7 l33t


Joined: 22 Jan 2007 Posts: 708 Location: Billings, MT, USA
|
Posted: Sun Jun 08, 2008 3:59 am Post subject: |
|
|
I'm a little new to this (the scripting part).. How do you set one up? |
|
Back to top |
|
 |
Maliwik Apprentice


Joined: 14 Apr 2008 Posts: 252 Location: Wisconsin, U.S. of A.
|
Posted: Sun Jun 08, 2008 4:16 pm Post subject: |
|
|
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 |
|
 |
|