<p dir="ltr">Hey Martin,</p>
<p dir="ltr">Just put your files under defaults/etc/quagga, and use:</p>
<p dir="ltr"> defaults:<br>
plugin: dump<br>
source: defaults</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 2, 2016 7:36 PM, "Martin Winter" <<a href="mailto:mwinter@opensourcerouting.org">mwinter@opensourcerouting.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So I’ve updated the quagga snap from using the copy plugin to the dump plugin.<br>
I’ve got it working, but it looks like a horrible hack using the dump plugin<br>
to copy files.<br>
I use it to copy default configs to the correct location.<br>
<br>
This is what I had before using the copy plugin:<br>
<br>
[…]<br>
quagga-defaults:<br>
plugin: copy<br>
source: defaults<br>
files:<br>
"*.conf.default": /etc/quagga/<br>
[…]<br>
<br>
and this is what I use now with the dump plugin:<br>
<br>
[…]<br>
quagga-defaults:<br>
plugin: dump<br>
source: defaults<br>
organize:<br>
zebra.conf.default: etc/quagga/zebra.conf.default<br>
bgpd.conf.default: etc/quagga/bgpd.conf.default<br>
isisd.conf.default: etc/quagga/isisd.conf.default<br>
ospf6d.conf.default: etc/quagga/ospf6d.conf.default<br>
ospfd.conf.default: etc/quagga/ospfd.conf.default<br>
pimd.conf.default: etc/quagga/pimd.conf.default<br>
ripd.conf.default: etc/quagga/ripd.conf.default<br>
ripngd.conf.default: etc/quagga/ripngd.conf.default<br>
[…]<br>
<br>
Observations:<br>
I want to copy all files from my “defaults” directory (in the snapcraft build dir)<br>
to $SNAP/etc/quagga.<br>
The dump plugin doesn’t seem to support a destination, except with the “organize”<br>
function. And the “organize” function doesn’t support wildcards.<br>
<br>
This looks to me like bad code, but I can’t find a way to make this cleaner (better<br>
doc for the dump plugin would be highly appreciated)<br>
<br>
Maybe someone can comment on a better way? (It DOES WORK as shown, just trying to<br>
get feedback on a better/cleaner way, preferably with wildcard matching)<br>
<br>
- Martin Winter<br>
<br>
-- <br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
</blockquote></div></div>