scripts/installer.sh: check Photon OS version with pkg server.

Photon OS support crossed streams with using pkgserve to check
for supported versions 6f9aed1656.
Make Photon OS also rely on pkgserve.

Updates https://github.com/tailscale/tailscale/issues/7651
Updates https://github.com/tailscale/corp/issues/8952

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
Denton Gentry 2023-03-25 17:00:46 -07:00 committed by Denton Gentry
parent 5ba57e4661
commit ed10a1769b

View File

@ -316,7 +316,7 @@ main() {
# versions we support? # versions we support?
OS_UNSUPPORTED= OS_UNSUPPORTED=
case "$OS" in case "$OS" in
ubuntu|debian|raspbian|centos|oracle|rhel|amazon-linux|opensuse) ubuntu|debian|raspbian|centos|oracle|rhel|amazon-linux|opensuse|photon)
# Check with the package server whether a given version is supported. # Check with the package server whether a given version is supported.
URL="https://pkgs.tailscale.com/$TRACK/$OS/$VERSION/installer-supported" URL="https://pkgs.tailscale.com/$TRACK/$OS/$VERSION/installer-supported"
$CURL "$URL" 2> /dev/null | grep -q OK || OS_UNSUPPORTED=1 $CURL "$URL" 2> /dev/null | grep -q OK || OS_UNSUPPORTED=1
@ -350,13 +350,6 @@ main() {
openbsd) openbsd)
OS_UNSUPPORTED=1 OS_UNSUPPORTED=1
;; ;;
photon)
if [ "$VERSION" != "3" ] && \
[ "$VERSION" != "4" ]
then
OS_UNSUPPORTED=1
fi
;;
macos) macos)
# We delegate macOS installation to the app store, it will # We delegate macOS installation to the app store, it will
# perform version checks for us. # perform version checks for us.