laptop networking startup question

Derek Broughton news at pointerstop.ca
Tue Sep 27 14:20:41 UTC 2005


Tim T. wrote:

> Before I start reinventing the wheel: Has anybody ever seen a package that
> might solve the following problem:
> 
> - Laptop with onboard wireless, that needs to be turned on by software
> before I can actually load ndiswrapper
> - Can be connected to either my own home network (dhcp), home wireless
> network, office network, and
> occasionally standalone

Lots of them.  Whereami is my favorite.  Intuitively, divine,
laptop-net-conf (???).  Probably a dozen others.
> 
> What I'd like to do is select the type of network connection at boot time,
> including the option to just leave the network of..
> 
> I've looked at the default /etc/init.d/networking script, but that 'just'
> calls ifup.. I'm not sure I can start an interactive script from there..

man ifup should give you hints.

If you really need to do different things at different locations, then
'whereami' is ideal.  Since all the settings I need are supplied by DHCP,
whether I'm at work, at home wired, or at home wireless, I just
use /etc/network/interfaces, map eth* to 'default' and default is set to:
  # The primary network interface
  iface default inet dhcp
        hostname othello
        up      /etc/init.d/polipo restart &
        up      /etc/init.d/guarddog restart
        up      /etc/init.d/samba restart &
        up      /etc/init.d/ntpdate restart &
        up      /etc/news/leafnote/do-fetch-news &

ie, it restarts my proxy and firewall rules, samba, gets the current time
(these all usually run out of init, but there's never a network present by
then) and does an NNTP run (so as not to have to wait for the
every-15-minute cron).  There's also a mail server restart that runs out
of /etc/network/if-up.d.
-- 
derek





More information about the ubuntu-users mailing list