Counterpart of DPkg::Pre-Invoke and DPkg::Post-Invoke configurations in Snappy?

Etckeeper requires these configurations to autocommit /etc changes(mainly systemctl unit files) made by Snappy, is there any counterpart of these two configurations in Snappy?

From /etc/apt/apt.conf.d/05etckeeper:

DPkg::Pre-Invoke       { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; };
DPkg::Post-Invoke      { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; };

Currently there is no such functionality in snapd.

1 Like

Thanks for the attention. Also I’d like to ask if there’s any location to customize snapd’s behavior? It doesn’t seems to have configuration files in /etc…any pointers will be appreciated.

Snapd has a configuration system but it is not very sophisticated yet. In general you can get and set options on any snap (including on the core snap where snapd keeps its own settings). You can see more about this by using snap get --help and snap set --help

1 Like

Thanks for responding, I’ve filed a feature request on Launchpad regarding this issue:

1 Like