snap: revert to checking snapctl file existence (#9018)

While the previous approach of testing the functionality of snapctl
worked, the snapd developers told us they could not guarantee its
reliability.

---

As with #8955, I tested this on Debian 9, 10 and CentOS 7, 8, Stream.
This commit is contained in:
alexzorin
2021-09-03 07:47:12 -07:00
committed by GitHub
parent 0d4f92fa81
commit 8ff7153019
+2 -2
View File
@@ -7,9 +7,9 @@
SNAPCTL_CORE="/snap/core/current/usr/bin/snapctl"
SNAPCTL_SNAPD="/snap/snapd/current/usr/bin/snapctl"
SNAPCTL="snapctl"
if $SNAPCTL_CORE get x 2>/dev/null; then
if [ -x $SNAPCTL_CORE ]; then
SNAPCTL=$SNAPCTL_CORE
elif $SNAPCTL_SNAPD get x 2>/dev/null; then
elif [ -x $SNAPCTL_SNAPD ]; then
SNAPCTL=$SNAPCTL_SNAPD
fi