Browse Source

Add delayed execution to netplan preup.

Raphael Schneeberger 7 years ago
parent
commit
3ad3182c7e
2 changed files with 2 additions and 0 deletions
  1. 1 0
      bin/v-stop-firewall
  2. 1 0
      bin/v-update-firewall

+ 1 - 0
bin/v-stop-firewall

@@ -70,6 +70,7 @@ else
             echo '#!/bin/bash' > $preup
             echo '' >> $preup
             echo 'if [ "$IFACE" == "'$(/bin/ip token | awk -F 'dev ' '{print $2}')'" ]; then' >> $preup
+            echo '    sleep 3' >> $preup
             echo '    /sbin/iptables-restore < /etc/iptables.rules' >> $preup
             echo 'fi' >> $preup
             echo "exit 0" >> $preup

+ 1 - 0
bin/v-update-firewall

@@ -171,6 +171,7 @@ else
             echo '#!/bin/bash' > $preup
             echo '' >> $preup
             echo 'if [ "$IFACE" == "'$(/bin/ip token | awk -F 'dev ' '{print $2}')'" ]; then' >> $preup
+            echo '    sleep 3' >> $preup
             echo '    /sbin/iptables-restore < /etc/iptables.rules' >> $preup
             echo 'fi' >> $preup
             echo "exit 0" >> $preup