summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-29 18:31:01 +0200
committerTom Gundersen <teg@jklm.no>2015-05-29 18:52:13 +0200
commit3cbb20578b4cc239b049d4901fdac42640f4879e (patch)
tree2dc75bd11196a67a3337dcb56d58c40dcca09604 /src/udev/udevd.c
parent8128f2297da0c2fdd82b3d48f049deb01763f8c8 (diff)
udevd: modernize status notification
Only log about starting in daemon mode, rely on PID1 to log this in notify mode. Also explicitly set the STATUS variable, as is done in notify mode as is done for other serivecs.
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index dbfe5f940f..5bfeefdf7d 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1658,8 +1658,6 @@ int main(int argc, char *argv[]) {
if (r < 0)
goto exit;
- log_info("starting version " VERSION);
-
r = udev_rules_apply_static_dev_perms(manager->rules);
if (r < 0)
log_error_errno(r, "failed to apply permissions on static device nodes: %m");
@@ -1667,6 +1665,8 @@ int main(int argc, char *argv[]) {
if (arg_daemonize) {
pid_t pid;
+ log_info("starting version " VERSION);
+
pid = fork();
switch (pid) {
case 0:
@@ -1684,7 +1684,9 @@ int main(int argc, char *argv[]) {
write_string_file("/proc/self/oom_score_adj", "-1000");
} else
- sd_notify(true, "READY=1");
+ sd_notify(true,
+ "READY=1\n"
+ "STATUS=Processing...");
r = manager_listen(manager);
if (r < 0)