simplify the code

modified:   set_bonding.sh

	Signed-off-by: swei <swei@linx-info.com>
This commit is contained in:
swei
2014-03-27 16:13:10 +08:00
parent a34b33497d
commit b46436f532

View File

@@ -25,8 +25,7 @@ IF_CONFIG="/etc/sysconfig/network-devices"
if [ -f ${IF_CONFIG}/ifcfg-bond0 ];then
echo "bonding exit.."
else
grep "^bonding" /etc/sysconfig/modules &> /dev/null
if [ $? -eq 0 ];then
if ! grep -q "^bonding" /etc/sysconfig/modules;then
echo 'bonding mode=6 max_bonds=1' >> /etc/sysconfig/modules
fi