From 71d793efdb0d96ba2229daba540c18d20df4ce1b Mon Sep 17 00:00:00 2001 From: Max Ka Date: Fri, 14 Feb 2020 18:47:52 +0100 Subject: [PATCH] use grep instead of sed for SP version --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index db905ab..54e6307 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1610,7 +1610,7 @@ __check_end_of_life_versions() { # < 11 SP4 # < 12 SP2 # < 15 SP1 - SUSE_PATCHLEVEL=$(awk -F'=' '/VERSION_ID/ { print $2 }' /etc/os-release | sed 's/[[:digit:]]\+\.//g' ) + SUSE_PATCHLEVEL=$(awk -F'=' '/VERSION_ID/ { print $2 }' /etc/os-release | grep -oP "\.\K\w+") if [ "${SUSE_PATCHLEVEL}" = "" ]; then SUSE_PATCHLEVEL="00" fi