From 743dbe7b151812e9aaaab47c65d90c9660d852bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rainer=20M=C3=BCller?= <raimue@macports.org>
Date: Wed, 31 May 2017 16:49:05 +0200
Subject: [PATCH] salt: Properly install default configuration files
Closes: https://trac.macports.org/ticket/48398
---
sysutils/salt/Portfile | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/sysutils/salt/Portfile b/sysutils/salt/Portfile
index 35de556a92..1862f57e16 100644
a
|
b
|
PortSystem 1.0 |
4 | 4 | |
5 | 5 | name salt |
6 | 6 | version 2017.5 |
| 7 | revision 1 |
7 | 8 | categories sysutils |
8 | 9 | platforms darwin |
9 | 10 | maintainers gmail.com:jeremy.mcmillan |
… |
… |
if {$subport eq $name} { |
38 | 39 | port:py${python.version}-zmq \ |
39 | 40 | port:swig-python |
40 | 41 | |
41 | | post-activate { |
42 | | |
43 | | file mkdir ${prefix}/etc/salt |
| 42 | post-destroot { |
| 43 | xinstall -d ${destroot}${prefix}/etc/salt |
| 44 | foreach f {minion master} { |
| 45 | xinstall -m 644 ${worksrcpath}/conf/$f ${destroot}${prefix}/etc/salt/$f.default |
| 46 | } |
| 47 | } |
44 | 48 | |
| 49 | post-activate { |
45 | 50 | if ![file exists /etc/salt] { |
46 | 51 | ln -s ${prefix}/etc/salt /etc/salt |
47 | 52 | } |
48 | 53 | |
49 | | if ![file exists ${prefix}/etc/salt/minion] { |
50 | | copy ${worksrcpath}/conf/minion ${prefix}/etc/salt |
51 | | } |
52 | | |
53 | | if ![file exists ${prefix}/etc/salt/master] { |
54 | | copy ${worksrcpath}/conf/master ${prefix}/etc/salt |
| 54 | foreach f {minion master} { |
| 55 | if ![file exists ${prefix}/etc/salt/$f] { |
| 56 | copy ${prefix}/etc/salt/$f.default ${prefix}/etc/salt/$f |
| 57 | } |
55 | 58 | } |
56 | 59 | } |
57 | 60 | |