projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e78355b
)
Install iptables-persistent if it doesn't exist
74/8974/4
v7.1.0rc3
v7.1.0rc4
author
David Garcia
<david.garcia@canonical.com>
Tue, 26 May 2020 17:27:03 +0000
(19:27 +0200)
committer
David Garcia
<david.garcia@canonical.com>
Tue, 26 May 2020 17:53:17 +0000
(19:53 +0200)
Change-Id: I7535e7ff3b74236cd3c7e752244252481582d557
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/provisioner.py
patch
|
blob
|
history
diff --git
a/n2vc/provisioner.py
b/n2vc/provisioner.py
index
b170b2e
..
fbb16ca
100644
(file)
--- a/
n2vc/provisioner.py
+++ b/
n2vc/provisioner.py
@@
-72,8
+72,8
@@
fi
IPTABLES_SCRIPT = """#!/bin/bash
set -e
-apt-get update
-DEBIAN_FRONTEND=noninteractive apt-get install -yqq iptables-persistent
+[ -v `which netfilter-persistent` ] && apt update \
+
&&
DEBIAN_FRONTEND=noninteractive apt-get install -yqq iptables-persistent
iptables -t nat -A OUTPUT -p tcp -d {} -j DNAT --to-destination {}
netfilter-persistent save
"""