Commit f1af5bc6 authored by Michael Stapelberg's avatar Michael Stapelberg

Also redirect to update-rc.d when not using .service

I.e. make systemctl enable rsyslog work (previously, only systemctl
enable rsyslog.service)
parent b0806233
......@@ -4042,9 +4042,6 @@ static int enable_sysv_units(char **args) {
name = args[f];
if (!endswith(name, ".service"))
continue;
if (path_is_absolute(name))
continue;
......@@ -4076,7 +4073,8 @@ static int enable_sysv_units(char **args) {
goto finish;
}
p[strlen(p) - sizeof(".service") + 1] = 0;
if (endswith(name, ".service"))
p[strlen(p) - sizeof(".service") + 1] = 0;
found_sysv = access(p, F_OK) >= 0;
if (!found_sysv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment