commit 66cb2317fd04bf2562579751f40e12d542553b3b Author: Tristan Cacqueray Date: Fri Oct 2 18:15:28 2020 +0000 infra-package-needs: add support for centos-8-stream This change fix the centos version check to work with both '8' and '8-stream' value for DIB_RELEASE. The current test is failing with: $ export DIB_RELEASE=8-stream $ set -u $ [[ $DIB_RELEASE -gt 8 ]] bash: stream: unbound variable The fix is lifted from https://review.opendev.org/#/c/734083/14/diskimage_builder/elements/simple-init/environment.d/15-simple-init-networkmanager Change-Id: I23dca12eef1c3cc2aacf6ac50029e2bc9fde72dc diff --git a/nodepool/elements/infra-package-needs/post-install.d/80-enable-infra-services b/nodepool/elements/infra-package-needs/post-install.d/80-enable-infra-services index 30dae70..3f2d692 100755 --- a/nodepool/elements/infra-package-needs/post-install.d/80-enable-infra-services +++ b/nodepool/elements/infra-package-needs/post-install.d/80-enable-infra-services @@ -17,7 +17,7 @@ case "$DIB_INIT_SYSTEM" in if [[ ${DIB_RELEASE} != 'focal' ]]; then systemctl enable ntp.service fi - elif [[ $DISTRO_NAME == "centos" && $DIB_RELEASE -ge 8 ]]; then + elif [[ $DISTRO_NAME == "centos" && $DIB_RELEASE > 7 ]]; then systemctl enable chronyd else systemctl enable ntpd.service