From 2a8f737f3cf548386f025a436da5e66f59af858b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 2 May 2022 18:10:07 +0530 Subject: [PATCH] donot start radvd on startup Signed-off-by: Abhishek Kumar --- systemvm/debian/opt/cloud/bin/setup/common.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh index 503f55e73b9..4215466aff4 100755 --- a/systemvm/debian/opt/cloud/bin/setup/common.sh +++ b/systemvm/debian/opt/cloud/bin/setup/common.sh @@ -300,7 +300,7 @@ restore_ipv6() { fi if [ -n "$ETH0_IP6" ] then - enable_radvd + enable_radvd true fi if [ -n "$ETH2_IP6" ] then @@ -409,12 +409,15 @@ enable_radvd() { systemctl enable radvd echo "radvd" >> /var/cache/cloud/enabled_svcs fi - systemctl -q is-active radvd - status=$? - if [ $status -ne 0 ] - then - log_it "Starting radvd" - systemctl start radvd + local startradvd=$1 + if [ "$startradvd" = true ] ; then + systemctl -q is-active radvd + status=$? + if [ $status -ne 0 ] + then + log_it "Starting radvd" + systemctl start radvd + fi fi } @@ -442,7 +445,7 @@ setup_radvd() { sed -i "s,{{ RDNSS_CONFIG }},$RDNSS_CFG,g" /etc/radvd.conf.$intf cat /etc/radvd.conf.$intf >> /etc/radvd.conf if [ "$enable" = true ] ; then - enable_radvd + enable_radvd false fi }