* plymouth after/before getty?
-* in systemctl show sysv init script path
+* D-Bus call GetUnitByPID
+
+* be more forgiving when parsing unit files, when encountering incorrect lines with non assignments
External:
const char *description;
- const char *fragment_path;
+ const char *path;
const char *default_control_group;
bool need_daemon_reload;
printf("\n");
- if (i->fragment_path)
- printf("\t Loaded: %s (%s)\n", strna(i->load_state), i->fragment_path);
- else if (streq_ptr(i->load_state, "failed"))
- printf("\t Loaded: %s%s%s\n",
- ansi_highlight(true),
- strna(i->load_state),
- ansi_highlight(false));
+ if (streq_ptr(i->load_state, "failed")) {
+ on = ansi_highlight(true);
+ off = ansi_highlight(false);
+ } else
+ on = off = "";
+
+ if (i->path)
+ printf("\t Loaded: %s%s%s (%s)\n", on, strna(i->load_state), off, i->path);
else
- printf("\t Loaded: %s\n", strna(i->load_state));
+ printf("\t Loaded: %s%s%s\n", on, strna(i->load_state), off);
ss = streq_ptr(i->active_state, i->sub_state) ? NULL : i->sub_state;
else if (streq(name, "Description"))
i->description = s;
else if (streq(name, "FragmentPath"))
- i->fragment_path = s;
+ i->path = s;
+ else if (streq(name, "SysVPath"))
+ i->path = s;
else if (streq(name, "DefaultControlGroup"))
i->default_control_group = s;
else if (streq(name, "StatusText"))