From 616794857db309d89f24a39e72535064c3bdb375 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 7 Jul 2020 14:19:40 +0100 Subject: [PATCH] Stop subiquity-service on non-installer media. --- snap/hooks/install | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 snap/hooks/install diff --git a/snap/hooks/install b/snap/hooks/install new file mode 100755 index 00000000..948b6c5e --- /dev/null +++ b/snap/hooks/install @@ -0,0 +1,9 @@ +#!/bin/sh + +# snapd will always start subiquity.service, but when we are not +# booted off the server.iso there is not enough things in place to run +# subiquity. Keep subiquity installed, but do not start the +# service. This way, one can use --dry-run mode for example. +if [ ! -e /cdrom/.disk/info ]; then + snapctl stop --disable "$SNAP_NAME.subiquity-service" +fi