Stop subiquity-service on non-installer media.

This commit is contained in:
Dimitri John Ledkov 2020-07-07 14:19:40 +01:00
parent 317648aec4
commit 616794857d
No known key found for this signature in database
GPG Key ID: 9B8EC849D5EF70ED
1 changed files with 9 additions and 0 deletions

9
snap/hooks/install Executable file
View File

@ -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