summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 61b150cba8..3fbb0a136d 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -331,7 +331,7 @@ static char *sysv_translate_name(const char *name) {
if (endswith(name, ".sh"))
/* Drop .sh suffix */
strcpy(stpcpy(r, name) - 3, ".service");
- if (startswith(name, "rc."))
+ else if (startswith(name, "rc."))
/* Drop rc. prefix */
strcpy(stpcpy(r, name + 3), ".service");
else