summaryrefslogtreecommitdiffstats
path: root/retiolum
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-01-14 16:36:13 +0100
committertv <tv@nomic.retiolum>2013-01-14 16:36:13 +0100
commit47a6395ee891488be4becd1f3292bd28811f0069 (patch)
tree304e90e6389595226cfc3c0fd96de9a108669407 /retiolum
parentbce6236eb787c047cfee496640533676d6dfeb45 (diff)
retiolum apply-custom-hosts-patches: initial commit
Custom hosts patches are currently used for "LAN supernodes". Example patch: --- destroy 2012-05-12 04:13:57.081041849 +0100 +++ destroy 2013-01-13 18:35:30.087707751 +0100 @@ -1,3 +1,4 @@ +Address = destroy.local Subnet = 42:9277:1f1e:7599:ae4b:7cca:b4a3:fe47/128 Subnet = 10.243.0.31/32 Compression = 9
Diffstat (limited to 'retiolum')
-rwxr-xr-x[-rw-r--r--]retiolum/Makefile1
-rwxr-xr-xretiolum/bin/apply-custom-hosts-patches8
2 files changed, 9 insertions, 0 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index a8ae0973..f3424dea 100644..100755
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -29,3 +29,4 @@ startup:
hosts:
bin/update-retiolum-hosts || :;
+ sudo bin/apply-custom-hosts-patches
diff --git a/retiolum/bin/apply-custom-hosts-patches b/retiolum/bin/apply-custom-hosts-patches
new file mode 100755
index 00000000..2b2fda80
--- /dev/null
+++ b/retiolum/bin/apply-custom-hosts-patches
@@ -0,0 +1,8 @@
+#! /bin/sh
+set -euf
+
+patch=/etc/tinc/retiolum/hosts.patch
+
+if test -e $patch; then
+ patch -N -d /etc/tinc/retiolum/hosts -r - < $patch
+fi