From 0949724ef67253cebee51d3323f2318b0bdcd46f Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Tue, 29 May 2018 11:49:38 +0200 Subject: Bug: let node init also support stretch Currently it will spit out a warning when on stretch but continue, jessie is still supported. Others will give an error. Related #8916 Fixes #8922 --- bin/node_init | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/node_init b/bin/node_init index 24345b47..488f189b 100755 --- a/bin/node_init +++ b/bin/node_init @@ -4,7 +4,8 @@ # This script is run on the target server when `leap node init` is run. # -DEBIAN_VERSION="^(jessie|8\.)" +DEBIAN_JESSIE="^(jessie|8\.)" +DEBIAN_STRETCH="^(stretch|9\.)" LEAP_DIR="/srv/leap" HIERA_DIR="/etc/leap" INIT_FILE="/srv/leap/initialized" @@ -17,8 +18,10 @@ BAD_APT_RESPONSE="(BADSIG|NO_PUBKEY|KEYEXPIRED|REVKEYSIG|NODATA|Could not resolv export DEBIAN_FRONTEND=noninteractive test -f $INIT_FILE && rm $INIT_FILE -if ! egrep -q "$DEBIAN_VERSION" /etc/debian_version; then - echo "ERROR: This operating system is not supported. The file /etc/debian_version must match /$DEBIAN_VERSION/ but is: `cat /etc/debian_version`" +if egrep -q "$DEBIAN_STRETCH" /etc/debian_version; then + echo "WARNING: This operating system is under development. The file /etc/debian_version must match /$DEBIAN_JESSIE/ but is: `cat /etc/debian_version`" + elif ! egrep -q "$DEBIAN_JESSIE" /etc/debian_version; then + echo "ERROR: This operating system is not supported. The file /etc/debian_version must match /$DEBIAN_JESSIE/ but is: `cat /etc/debian_version`" exit 1 fi mkdir -p $LEAP_DIR -- cgit v1.2.3