mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
use grep instead of sed for SP version
This commit is contained in:
parent
6a1d0e9cb4
commit
71d793efdb
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue