diff options
author | Simon Rettberg | 2016-02-11 17:46:19 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-02-11 17:46:19 +0100 |
commit | 308812e969a0ad53ef1f9853c70b546d3e52e16a (patch) | |
tree | 1d1b1e975ffdfe9ffc8fa58a8335f116fc55278e /satellit_upgrader/updater.template.sh | |
parent | [SSUS] Call me v1.0-RC1 (diff) | |
download | setup-scripts-308812e969a0ad53ef1f9853c70b546d3e52e16a.tar.gz setup-scripts-308812e969a0ad53ef1f9853c70b546d3e52e16a.tar.xz setup-scripts-308812e969a0ad53ef1f9853c70b546d3e52e16a.zip |
[SSUS] Add very basic sanity check before starting update
Diffstat (limited to 'satellit_upgrader/updater.template.sh')
-rw-r--r-- | satellit_upgrader/updater.template.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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 |