From e227e27ec848a9c0e07ff5381a1dabd1193a5cdb Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Wed, 16 Sep 2026 09:27:02 +0200 Subject: [PATCH] docs(docs): separate symlink and config installation Document the executable and APT hook as symlinks into the repository\ncheckout. This keeps development changes immediately available at the\ninstalled paths.\n\nKeep the runtime configuration as an installed copy so local settings remain\nindependent from the checkout. Explain the expected paths and the need to\nupdate the APT executable path when choosing different locations. --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6f64f47..c896657 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,25 @@ This is the Ubuntu/APT counterpart to [zfs-pacman-hook](https://quico.space/quic ## Setup -Install the files as follows: +Clone this repository into an arbitrary location ``. Install the +executable and APT hook as symlinks so that changes in the checkout are +immediately available. Install the runtime configuration as a copy so that +local configuration is not tied to the repository checkout: ```bash -sudo install -Dm755 apt-zfs-snapshot.sh /usr/local/sbin/apt-zfs-snapshot -sudo install -Dm644 apt-zfs-snapshot.conf /etc/apt-zfs-snapshot.conf -sudo install -Dm644 90apt-zfs-snapshot.conf /etc/apt/apt.conf.d/90apt-zfs-snapshot.conf +sudo chmod +x /apt-zfs-snapshot.sh +sudo ln -s /apt-zfs-snapshot.sh \ + /usr/local/sbin/apt-zfs-snapshot +sudo ln -s /90apt-zfs-snapshot.conf \ + /etc/apt/apt.conf.d/90apt-zfs-snapshot.conf +sudo install -Dm644 /apt-zfs-snapshot.conf \ + /etc/apt-zfs-snapshot.conf ``` +The symlink targets must remain at the paths used in the commands above. If +you choose different target locations, update the executable path in +`90apt-zfs-snapshot.conf` as well. + Set `dry_run='true'` in `/etc/apt-zfs-snapshot.conf`, run a harmless APT operation, and inspect the planned names. Set it back to `false` after verifying dataset selection and naming. The helper runs as root through APT and requires Bash, `zfs`, and `findmnt`.