Run the ping6 command with correct interface.

In case of vpn, use it.
parent 25b7e55a
...@@ -33,12 +33,17 @@ if [ $ONLY_SLAPFORMAT = false ]; then ...@@ -33,12 +33,17 @@ if [ $ONLY_SLAPFORMAT = false ]; then
# Wait for ipv6 connection to be ready # Wait for ipv6 connection to be ready
echo "Checking IPv6 connectivity. This may take a few seconds..." echo "Checking IPv6 connectivity. This may take a few seconds..."
ping6 -c 2 $IPV6CHECK >/dev/null 2>&1 if [ -f $SLAPOS_CONFIGURATION/openvpn-needed ]; then
PING6_COMMAND="ping6 -I tapVPN -c 2 $IPV6CHECK"
else
PING6_COMMAND="ping6 -c 2 $IPV6CHECK"
fi
$PING6_COMMAND
while [ $? != 0 ]; while [ $? != 0 ];
do do
echo "IPv6 is not ready yet." echo "IPv6 is not ready yet."
sleep 2 sleep 2
ping6 -c 2 $IPV6CHECK >/dev/null 2>&1 $PING6_COMMAND >/dev/null 2>&1
done done
else else
sleep 15 sleep 15
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment