diff mbox series

[OSSTEST,05/36] ts-host-install: fix ntp.conf path on bookworm

Message ID 20240318165545.3898-6-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Switch to Debian Bookworm | expand

Commit Message

Anthony PERARD March 18, 2024, 4:55 p.m. UTC
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 ts-host-install | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ts-host-install b/ts-host-install
index f79a1beb..61433e64 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -151,7 +151,13 @@  END
 
     my $ntpserver = get_target_property($ho, 'NtpServer');
     if ($ntpserver) {
-	target_editfile_root($ho, '/etc/ntp.conf', sub {
+        my $ntpconf_path;
+        if ($ho->{Suite} =~ m/lenny|squeeze|wheezy|jessie|stretch|buster/) {
+            $ntpconf_path = '/etc/ntp.conf';
+        } else {
+            $ntpconf_path = '/etc/ntpsec/ntp.conf';
+        }
+	target_editfile_root($ho, $ntpconf_path, sub {
 	    my $done= 0;
 	    while (<EI>) {
 		if (m/^server\b|^pool\b\s/) {