]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-host-install: fix ntp.conf path on bookworm
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 7 Jun 2023 18:35:17 +0000 (19:35 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 28 Mar 2024 16:51:52 +0000 (16:51 +0000)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
ts-host-install

index f79a1bebce7b5a8bee8191821ae02dba1836687e..61433e646e43e71e47909c0e0779a4bd869f01bb 100755 (executable)
@@ -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/) {