From 279fabe9b40fe25849dea62ca68164ba2475ee4e Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Mon, 15 Nov 2021 19:25:24 +0900 Subject: [PATCH] scylla_ntp_setup: use string in systemd_unit.is_active() Since we reverted 2545d7fd438338263d0cc52eb8e7433fb61afee7, we need to use string instead of bool value. --- dist/common/scripts/scylla_ntp_setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/common/scripts/scylla_ntp_setup b/dist/common/scripts/scylla_ntp_setup index d813b6a668..1d7ae74bc7 100755 --- a/dist/common/scripts/scylla_ntp_setup +++ b/dist/common/scripts/scylla_ntp_setup @@ -66,18 +66,18 @@ if __name__ == '__main__': target = None if os.path.exists('/lib/systemd/systemd-timesyncd'): - if systemd_unit('systemd-timesyncd').is_active(): + if systemd_unit('systemd-timesyncd').is_active() == 'active': print('ntp is already configured, skip setup') sys.exit(0) target = 'systemd-timesyncd' if shutil.which('chronyd'): - if get_chrony_unit().is_active(): + if get_chrony_unit().is_active() == 'active': print('ntp is already configured, skip setup') sys.exit(0) if not target: target = 'chrony' if shutil.which('ntpd'): - if get_ntp_unit().is_active(): + if get_ntp_unit().is_active() == 'active': print('ntp is already configured, skip setup') sys.exit(0) if not target: