Comment 4 for bug 1605303

Revision history for this message
Andy Whitcroft (apw) wrote :

This blind assumption that all units starting with snap[-.] are ours to do with as we see fit seems suspect. snapd does not own the snap prefix exclusively. We could imagine a package with a snap-shotting-service.service which would now get randomly stopped when snapd is removed:

+ mounts="$(systemctl list-unit-files | grep '^snap[-.].*\.mount' | cut -f1 -d ' ')"
+ services="$(systemctl list-unit-files | grep '^snap[-.].*\.service' | cut -f1 -d ' ')"

As we are making these dynamically can we not record them or tag them internally so we are sure they are ours? Or perhaps make them symlinks to somewhere else so we can positively identify the ones which we made.