From 50c2cfe8b372d048c8d1a320eb3b392e212f6135 Mon Sep 17 00:00:00 2001 From: zhangzhangzf <32992253+zhangzhangzf@users.noreply.github.com> Date: Thu, 10 Mar 2022 11:31:26 +0800 Subject: [PATCH] Update mk-docker-opts.sh update route conflict --- dist/mk-docker-opts.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/mk-docker-opts.sh b/dist/mk-docker-opts.sh index e0f438215e..0df01c0a39 100755 --- a/dist/mk-docker-opts.sh +++ b/dist/mk-docker-opts.sh @@ -107,4 +107,7 @@ dot_four=$((${dot_four}-1)) subnets_pre=`echo ${subnets}|cut -d. -f 1,2,3` subnets_lat=`echo ${subnets}|cut -d/ -f2` subnets=${subnets_pre}.${dot_four}/${subnets_lat} -ip route del ${subnets} \ No newline at end of file +route_invalid=`ip route show|grep ${subnets}|grep via` +if [ "x${route_invalid}" != "x" ];then + ip route del ${route_invalid} +fi