From 308812e969a0ad53ef1f9853c70b546d3e52e16a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 11 Feb 2016 17:46:19 +0100 Subject: [SSUS] Add very basic sanity check before starting update --- satellit_upgrader/updater.template.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'satellit_upgrader/updater.template.sh') diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 519eb0f..85b5163 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -3,6 +3,19 @@ # Use special param to make sure we're running under bash (in case user does "sh install.sh") [ "x$1" != "x--exec-self" ] && exec /bin/bash "$0" --exec-self "$@" +if [ ! -d "/opt/dmsd" ] && [ ! -d "/srv/openslx/www/slx-admin" ]; then + echo "This system doesn't look like a bwLehrpool Satellite Server" + exit 1 +fi + +TEST1=$(which systemctl) +TEST2=$(lsb_release -sc) +if [ -z "$TEST1" ] || [ "x$TEST2" != "xjessie" ]; then + echo "This Version of the bwLehrpool Satellite Server is too old!" + exit 1 +fi +unset TEST1 TEST2 + unset TMPDIR [ -n "$TMPDIR" ] && exit 1 -- cgit v1.2.3-55-g7522