Script help

Tom Brown tom at ng23.net
Tue Feb 12 10:23:37 UTC 2008


Hi

I am scripting some post install bits on a kickstart machine that 
downloads certain configuration files depending on the network the 
machine is in.

I am trying to construct an if statement that will run something like



ADDR=`ifconfig | grep "inet addr" | head -2 | awk '{print$2'} | cut -c 
14,15`

if [ "$ADDR" = "11" ] ; then
        echo "downloading bar"
fi

if [ "$ADDR" = "12" ] ; then
        echo "downloading foo"

fi

etc

and there are 5 different configs - If none of the configs are found 
then it downloads a default - Am i going about this the right way?

thanks





More information about the fedora-list mailing list