View previous topic :: View next topic |
Author |
Message |
Vyeperman Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Dec 2003 Posts: 89
|
Posted: Sat Jun 19, 2004 7:39 pm Post subject: Looking for a better way to move from network to network |
|
|
Hey,
My laptop is moving from 2-4 networks a day and I have all the static/gateway information in my /etc/conf.d/net but it's really getting annoying to haft to open that file up comment out one line and uncomment another then kill eth0 and then start it. What do you guys do is their a better way to do this? _________________ -Vyeperman |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JPMRaptor Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/518942103409c3fbe53c05.jpg)
Joined: 04 Oct 2002 Posts: 410 Location: Maryland
|
Posted: Sat Jun 19, 2004 7:43 pm Post subject: |
|
|
My way is not much better (I don't move it very often). I have several net files (net.home, net.dhcp, ...) and I create a symlink for net to the appropriate one. I still have to do the net restart, but at least I'm not editing the files over and over again. _________________ Underwater photo gallery
New pictures, Oct 2005 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Vyeperman Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Dec 2003 Posts: 89
|
Posted: Sat Jun 19, 2004 7:46 pm Post subject: |
|
|
Hmmm is their a way to make it guess when it boots? like have a few options then it tries them on the network and finds the correct one?
I don't know if that is even a valid Idea. Anymore ideas? _________________ -Vyeperman |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JPMRaptor Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/518942103409c3fbe53c05.jpg)
Joined: 04 Oct 2002 Posts: 410 Location: Maryland
|
Posted: Sat Jun 19, 2004 10:14 pm Post subject: |
|
|
It sounds like a valid idea, don't give up hope. Looking at the /etc/init.d/net* script I don't see how it's loading the /etc/conf.d/net file. The only place that shows up is in comments in the script. Hopefully someone else out there knows how it's getting loaded.
Once we figure out where it's getting loaded it shouldn't be too bad to do a little test for something that would load an alternate file. _________________ Underwater photo gallery
New pictures, Oct 2005 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sat Jun 19, 2004 10:41 pm Post subject: |
|
|
The /etc/conf.d/net "script" contains only variables; it is sourced at the beginning of /etc/init.d/net.
Just make a few one-liner bash scripts, one for each network.
Since this is Linux, all you need to do is change ifconfig and resolv.conf and you ARE on a different network. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bunder Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Sat Jun 19, 2004 10:52 pm Post subject: |
|
|
There is a way to specify what net settings to use on boot, it involves duplicating the "default" runlevel, modifying it, and telling your boot loader to load the other level. I can't remember which section it was in, take a poke around. HTH |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
groover n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jan 2004 Posts: 38
|
Posted: Sun Jun 20, 2004 8:02 am Post subject: This problem is solved |
|
|
Hey guys.
I had the same problem, had... A fried developed "autonet", you can find it here:
http://freshmeat.net/projects/autonet/
This one checks your networking configurations at bootup after /etc/init.d/net.eth0 has been started and tries to setup up to a working internet connection.
sebas developed autonet for Debian and Gentoo, and in my case it runs great!
But than there's the next problem... (and sebas is on holidays, so he can't enhance autonet about the following function).
I think, I need something, let's call it "netexec".
When I'm at work it takes about 15 Minutes, that netmount fails all nfs shares I use in my localnet at home. It really sucks!, and I can't imagine, that there is no possibility to solve the problem, that you need to disable bootup functions, in example netmount.
When sebas is back again, I know, he will develop netexec as a sub to autonet, but for now there seems to be no other way to get this running?
Thanks a lot,
groover. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
groover n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jan 2004 Posts: 38
|
Posted: Mon Jun 21, 2004 4:17 pm Post subject: netexec |
|
|
Hello,
the problem about dynamically starting services depending on the current network configuration found out by autonet is solved in pre_alpha :)
I wrote a small script in perl and an init script and a config file for /etc/conf.d -> "netexec"
You can download this on my server at:
http://streik.no-ip.org/~groover/netexec/netexec.tar.bz2
Perhaps you like it :)
If yes, please let me know. I think there are good instructions in the give README file.
Greetings,
groover _________________ If I was you, I'd like to be me. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cpr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Apr 2004 Posts: 22
|
Posted: Fri Jun 25, 2004 6:31 pm Post subject: |
|
|
You can try hprofile, that script already offers all one needs. hprofile is in portage.
When I roam, I type as root e.g.
and replug / insert my wlan card.
The docs explain everything in (overwhelming) details. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
flybynite l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 06 Dec 2002 Posts: 620
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
groover n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jan 2004 Posts: 38
|
Posted: Mon Jun 28, 2004 3:35 am Post subject: Sorry |
|
|
... but hprofile and quickswitch are not, what I need.
I don't want to do anything! Everything should be done completely automatically! That is, what autonet and netexec do.
sebas and I figured out a bug in autonet what makes netexec broken, so I decided to develop netexec standalone with no more dependencies to autonet.
But, thanks for your replies.
Greetings, groover _________________ If I was you, I'd like to be me. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Vyeperman Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Dec 2003 Posts: 89
|
Posted: Tue Jun 29, 2004 12:56 am Post subject: |
|
|
quickswitch looks like what I need, I'm compiling it right now. Thanks! _________________ -Vyeperman |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|