From b46436f5322473e3bef6f56b88911eb56748f655 Mon Sep 17 00:00:00 2001 From: swei Date: Thu, 27 Mar 2014 16:13:10 +0800 Subject: [PATCH] simplify the code modified: set_bonding.sh Signed-off-by: swei --- install_shell/set_bonding.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install_shell/set_bonding.sh b/install_shell/set_bonding.sh index e44c286..dd3de2c 100755 --- a/install_shell/set_bonding.sh +++ b/install_shell/set_bonding.sh @@ -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