re: question about ifup and ifconfig
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.
my question here is:
1) is ifup/ifdown written in c and realized a set function of
ifconfig and add route table?
2) how can i use ifconfig to bring up eth0 with dhcp?
thanks
--
To UNSUBSCRIBE, email to debian-chinese-gb-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
--
| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.
Reply to: