Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
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/) {