summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-01-29 10:47:53 +0100
committerGravatar Christian Hesse <mail@eworm.de>2018-01-29 10:47:53 +0100
commitc480580cf97917e0e77c583fb5efdb5282835ed7 (patch)
treeb586a3d9aa5f7ba918069e9073e8558970d650ae /bin
parent4510e1876835142d1125699b08e1cd1e910bcb29 (diff)
downloadmkinitcpio-ykfde-c480580cf97917e0e77c583fb5efdb5282835ed7.tar.gz
mkinitcpio-ykfde-c480580cf97917e0e77c583fb5efdb5282835ed7.tar.zst
improve systemd notification handling
Diffstat (limited to 'bin')
-rw-r--r--bin/ykfde.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ykfde.c b/bin/ykfde.c
index eac69c0..e01f82b 100644
--- a/bin/ykfde.c
+++ b/bin/ykfde.c
@@ -267,7 +267,7 @@ int main(int argc, char **argv) {
/* try to get a second factor */
if (iniparser_getboolean(ini, "general:" CONF2NDFACTOR, 0) > 0 &&
second_factor == NULL && new_2nd_factor == NULL) {
- if (sd_notify(0, "STATUS=0") == 0)
+ if (sd_notify(0, "READY=0\nSTATUS=Detecting systemd...") == 0)
fprintf(stderr, "Not running from systemd, you may have to give\n"
"second factor manually if required.\n");
else if ((key = keyctl_search(KEY_SPEC_USER_KEYRING, "user", "ykfde-2f", 0)) < 0)
@@ -405,6 +405,8 @@ int main(int argc, char **argv) {
goto out60;
}
+ sd_notify(0, "READY=1\nSTATUS=All done.");
+
rc = EXIT_SUCCESS;
out60: