Use recommended /etc/systemd/system by default

This commit is contained in:
Ilia
2022-04-23 01:14:19 +03:00
parent 05ed0be573
commit 9079d6121a

View File

@@ -2400,12 +2400,17 @@ sub get_systemd_root
{
my ($name) = @_;
if ($name) {
foreach my $p ("/etc/systemd/system", "/usr/lib/systemd/system",
"/lib/systemd/system") {
foreach my $p (
"/etc/systemd/system",
"/usr/lib/systemd/system",
"/lib/systemd/system") {
if (-r "$p/$name.service" || -r "$p/$name") {
return $p;
}
}
}
if (-d "/etc/systemd/system") {
return "/etc/systemd/system";
}
if (-d "/usr/lib/systemd/system") {
return "/usr/lib/systemd/system";