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:
f20c674
)
Install iptables-persistent if it doesn't exist
50/9050/1
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, 9 Jun 2020 06:48:24 +0000
(08:48 +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
"""