chiark / gitweb /
service: prefix description with LSB only if script has LSB header, use 'SysV:' otherwise
[elogind.git] / src / service.c
index 85175793428f77b8d7ac8261a40dc11490329e82..465e1a7a58ecc4bfb97519eec167c309f4d55ad4 100644 (file)
@@ -345,9 +345,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
                 return -ENOMEM;
 
 finish:
-
-        if (_r)
-                *_r = r;
+        *_r = r;
 
         return 1;
 }
@@ -837,7 +835,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
         if (description) {
                 char *d;
 
-                if (!(d = strappend("LSB: ", description))) {
+                if (!(d = strappend(s->sysv_has_lsb ? "LSB: " : "SysV: ", description))) {
                         r = -ENOMEM;
                         goto finish;
                 }