Script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux