donot start radvd on startup

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2022-05-02 18:10:07 +05:30
parent 486dd40569
commit 2a8f737f3c

View File

@ -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
}