summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--udev-block-notify.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/udev-block-notify.c b/udev-block-notify.c
index 32a761a..ee86208 100644
--- a/udev-block-notify.c
+++ b/udev-block-notify.c
@@ -307,6 +307,16 @@ int main (int argc, char ** argv) {
}
}
+ /* report stopping to systemd */
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "STOPPING=1\nSTATUS=Stopping...");
+#endif
+
udev_unref(udev);
+
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "STATUS=Stopped. Bye!");
+#endif
+
return EXIT_SUCCESS;
}