Network Menu
r...i trying to do Configuring the network Script but i always got error asking
./hk.sh: line 21: unexpected EOF while looking for matching `"'
./hk.sh: line 25: syntax error: unexpected end of file
Why? i ready don't know can you help me pls?
#!/bin/bash
echo "Network Menu"
echo
echo "1) Show network interface card (NIC) info like IP, netmask"
echo "2) Change selected NIC attributes like IP, netmask"
echo "3) Enable/Disable IP forwarding"
echo "4) Exit"
echo -n Enter your menu choice [1-4]: "
read opts
if [ "$opts"="1" ] ; then
for NIC in /sys/class/net/* ; do
INTERFACE=${NIC##*/} udevadm test --action=add $NIC
done
elif [ "opts"="2" ] ; then
vi /etc/sysconfig/network
elif [ "$opts"="4" ] ; then
exit
fi
done
Last edited by tnght2001; 06-23-2010 at 06:56 AM.
|