diff options
author | Daniel Baumann <daniel@debian.org> | 2012-12-17 13:40:28 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-12-17 13:41:26 +0100 |
commit | f9b415c580415d958256bf9ecbb6cce82fd970c7 (patch) | |
tree | 79f032b193d093de4392c20693d1f68d85d36772 | |
parent | 8d69592122eb33f6f155e7a82b0f7ea8dbb0ffb6 (diff) | |
download | vyos-live-build-f9b415c580415d958256bf9ecbb6cce82fd970c7.tar.gz vyos-live-build-f9b415c580415d958256bf9ecbb6cce82fd970c7.zip |
Correcting config tree version check for the current version.
-rwxr-xr-x | functions/defaults.sh | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index b8a3fc092..5dfd244b2 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -1214,20 +1214,24 @@ Check_defaults () # except when bootstrapping the functions/defaults etc.). CURRENT_CONFIG_VERSION="$(echo ${LB_CONFIG_VERSION} | awk -F. '{ print $1 }')" - if [ ${CURRENT_CONFIG_VERSION} -ge 4 ] + if [ ${CURRENT_CONFIG_VERSION} -ne 3 ] then - Echo_error "This config tree is too new for this version of live-build (${VERSION})." - Echo_error "Aborting build, please get a new version of live-build." - - exit 1 - elif [ ${CURRENT_CONFIG_VERSION} -le 2 ] - then - Echo_error "This config tree is too old for this version of live-build (${VERSION})." - Echo_error "Aborting build, please regenerate the config tree." - exit 1 - else - Echo_warning "This config tree does not specify a format version or has an unknown version number." - Echo_warning "Continuing build, but it could lead to errors or different results. Please regenerate the config tree." + if [ ${CURRENT_CONFIG_VERSION} -ge 4 ] + then + Echo_error "This config tree is too new for this version of live-build (${VERSION})." + Echo_error "Aborting build, please get a new version of live-build." + + exit 1 + elif [ ${CURRENT_CONFIG_VERSION} -le 2 ] + then + Echo_error "This config tree is too old for this version of live-build (${VERSION})." + Echo_error "Aborting build, please regenerate the config tree." + + exit 1 + else + Echo_warning "This config tree does not specify a format version or has an unknown version number." + Echo_warning "Continuing build, but it could lead to errors or different results. Please regenerate the config tree." + fi fi fi |