From 66cb2317fd04bf2562579751f40e12d542553b3b Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Fri, 2 Oct 2020 18:15:28 +0000 Subject: [PATCH] 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 --- .../infra-package-needs/post-install.d/80-enable-infra-services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 30dae7095e..3f2d692575 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