Skip to content

Commit a423af8

Browse files
authored
Merge pull request #9388 from skyamgarp/PA-6305
(PA-6305) Update tests for Ubuntu 24 ARM systemd behavior
2 parents 8273f16 + c89c20a commit a423af8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

acceptance/tests/resource/service/ticket_5024_systemd_enabling_masked_service.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525

2626
agents.each do |agent|
2727
platform = agent.platform.variant
28+
init_script_systemd = "/usr/lib/systemd/system/#{package_name[platform]}.service"
2829

29-
if agent['platform'] =~ /ubuntu-24.04-amd64/
30-
init_script_systemd = "/usr/lib/systemd/system/#{package_name[platform]}.service"
31-
elsif agent['platform'] =~ /(debian|ubuntu)/
30+
if agent['platform'] =~ /(ubuntu)/
31+
version = on(agent, facter('os.release.full')).stdout.chomp.to_i
32+
if version < 24
33+
init_script_systemd = "/lib/systemd/system/#{package_name[platform]}.service"
34+
end
35+
elsif agent['platform'] =~ /debian/
3236
init_script_systemd = "/lib/systemd/system/#{package_name[platform]}.service"
33-
else
34-
init_script_systemd = "/usr/lib/systemd/system/#{package_name[platform]}.service"
3537
end
3638

3739
symlink_systemd = "/etc/systemd/system/multi-user.target.wants/#{package_name[platform]}.service"

0 commit comments

Comments
 (0)