2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

routeop: support remove GATEWAY from /etc/sysconfig/network (#4807)

* remove GATEWAY from /etc/sysconfig/network

* polished
This commit is contained in:
Yuan Bai 2018-02-08 13:14:33 +08:00 committed by yangsong
parent 003d3a4a53
commit f06b0e09ea

View File

@ -756,6 +756,14 @@ rm_persistent_route()
else
echo "Persistent route file $filename does not exist."
fi
filename="/etc/sysconfig/network";
if [ "$net" = "default" -a -f $filename ]; then
grep "GATEWAY=$gw" $filename >/dev/null 2>&1
if [ $? -eq 0 ]; then
sed -i '/GATEWAY=/d' $filename
echo "Persistent GATEWAY=$gw removed from $filename."
fi
fi
;;
esac
else #AIX