Recently, Somebody Somewhere wrote these words
> > Ah, I realise now that it wasn't immediately obvious that I
> > meant the (wired) ethernet link status.
> > The general idea of what I have in mind is to be able to
> > determine from a script or unprivileged program if there is a
> > live cable in the ethernet port at the back of the machine. My
> > current thinking is in terms of a dockapp or similar which can
> > indicate what the current method of connection is or what is
> > available. Paul
>A thing that's leaping out to me here you probably already have.
There's a hotplug rc script(s) that throws every kernel module in the
pack at the kernel like mud at a wall, and hope some of them
stick. It's for 'coldbooting' hotpluggable devices. Don't ask me
where it's hidden. There's Cold War between hotplug and this
particular box. Is it /etc/hotplug/*.rc?
That and a simple lsmod |grep <module> gets your card type.
next, a trio of these:
if <wifi> then set up wifi and nuke the other nics
if <nic1> then set up nic1 && nuke etc.
That's the bones of a simple script to allow you to set up
according to which network you are on. You can, I am sure, ping
certain numbers or check for a hostname at this IP to
differentiate between networks. You can cobble up a bash script?
You could have this script run by a post-install command in
modules.conf on each network module and it would all go
automagically. Why bother reading up on a package to see if it
will configure to your tune? That sounds like work.
With best Regards,
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!