Re: question about ifup and ifconfig
On Fri, Mar 01, 2002 at 12:50:54PM +0800, Ren Weili wrote:
> i have my laptop so:
> /etc/init.d/networkings:
> case "$1" in
> start)
> doopt spoofprotect yes
> doopt syncookies no
> doopt ip_forward no
>
> echo -n "Configuring network interfaces: "
> echo "please select your environment:"
> echo "[1]:home"
> echo "[2]:office"
> read home_office
> if [ $home_office -eq "1" ]; then
> ifup -a -i /etc/network/interfaces.home
> rm -f /etc/resolv.conf
> ln -s /etc/resolv.conf.home /etc/resolv.conf
> rm -f /etc/apt/apt.conf
> elif [ $home_office -eq "2" ]; then
> ifup -a -i /etc/network/interfaces.office
> rm -f /etc/resolv.conf
> ln -s /etc/resolv.conf.office /etc/resolv.conf
> if [ ! -f /etc/apt/apt.conf ]; then
> ln -s /etc/apt/apt.conf.office
> /etc/apt/apt.conf
> fi
> fi
> echo "done."
> ;;
>
> and it works good.
You might try guessnet, which can automatically determine your
environment.
> my question here is:
> 2) how can i use ifconfig to bring up eth0 with dhcp?
man interfaces
apt-get install pump
--
David Roundy
http://civet.berkeley.edu/droundy/
Reply to: