Re: Different network environments
On Thu, 3 Apr 2003 13:20:45 +0200 (CEST)
"L. A. Linden Levy" <lindenle@students.uiuc.edu> wrote:
> This would be almost trivial to write as a bash script.
> i.e.
>
> #!/bin/bash
> /etc/sysconfig/network-scripts
> if [ "$1" -eq "DHCP" ]; then
> ifup ifcfg-eth0.dhcp
> elsif [ "$1" -eq "STATIC1" ]; then
> ifup ifcfg-eth0.static1
> #etc...for more connection
> fi
>
> Then put files of following form in /etc/sysconfig/network-scripts...
> DEVICE=eth0
> ONBOOT=yes
> BOOTPROTO=static
> IPADDR=xxx.xxx.xxx.xxx
> NETMASK=xxx.xxx.xxx.xxx
> GATEWAY=xxx.xxx.xxx.xxx
>
> You can look at /etc/init.d/network to see how this starts by
> itseld. Let me know if you need more help.
Perhaps you've lost your way ... Red Hat is around the corner. :)
Debian doesn't use /etc/sysconfig/network-scripts. There isn't even a
directory /etc/sysconfig/.
As it turns out the task is not so trivial, but there are several
packages to address it:
whereami
laptop-net
netenv
Kevin
Reply to: