install: Debian sid/buster has no VERSION_ID, error out.

Error out if debian has no VERSION_ID, point user to stable
packages.

Fixes: #357

Signed-off-by: Yang Bo <bo@hyper.sh>
This commit is contained in:
Yang Bo 2019-03-21 20:53:21 -07:00
parent 2069a3d953
commit 6ba8ae53dd

View File

@ -33,6 +33,9 @@
$ export DEBIAN_FRONTEND=noninteractive
$ ARCH=$(arch)
$ source /etc/os-release
$ [ "$ID" = debian ] && [ -z "$VERSION_ID" ] && echo >&2 "ERROR: Debian unstable not supported.
You can try stable packages here:
http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master" && exit 1
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Debian_${VERSION_ID}/ /' > /etc/apt/sources.list.d/kata-containers.list"
$ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Debian_${VERSION_ID}/Release.key | sudo apt-key add -
$ sudo -E apt-get update