From 453593943e41edc1b55372951af1e3b2768e59c0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Jan 2013 21:13:44 +0100 Subject: //retiolum patch-retiolum-hosts: allow --reverse --- retiolum/Makefile | 2 +- retiolum/bin/apply-custom-hosts-patches | 8 -------- retiolum/bin/patch-retiolum-hosts | 13 +++++++++++++ 3 files changed, 14 insertions(+), 9 deletions(-) delete mode 100755 retiolum/bin/apply-custom-hosts-patches create mode 100755 retiolum/bin/patch-retiolum-hosts diff --git a/retiolum/Makefile b/retiolum/Makefile index f3424dea..b3a3c124 100755 --- a/retiolum/Makefile +++ b/retiolum/Makefile @@ -29,4 +29,4 @@ startup: hosts: bin/update-retiolum-hosts || :; - sudo bin/apply-custom-hosts-patches + sudo bin/patch-retiolum-hosts diff --git a/retiolum/bin/apply-custom-hosts-patches b/retiolum/bin/apply-custom-hosts-patches deleted file mode 100755 index 2b2fda80..00000000 --- a/retiolum/bin/apply-custom-hosts-patches +++ /dev/null @@ -1,8 +0,0 @@ -#! /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 diff --git a/retiolum/bin/patch-retiolum-hosts b/retiolum/bin/patch-retiolum-hosts new file mode 100755 index 00000000..69d7b92c --- /dev/null +++ b/retiolum/bin/patch-retiolum-hosts @@ -0,0 +1,13 @@ +#! /bin/sh +# +# Apply custom retiolum hosts patches, if any. +# +# usage: patch-retiolum-hosts [--reverse] +# +set -euf + +patch=/etc/tinc/retiolum/hosts.patch + +if test -e $patch; then + patch -N -d /etc/tinc/retiolum/hosts -r - "$@" < $patch +fi -- cgit v1.2.3