about summary refs log tree commit diff
path: root/src/nm-dispatcher
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-05-05 00:07:42 +0200
committerMichael Biebl <biebl@debian.org>2024-05-05 00:07:42 +0200
commita9c892f6640668b93848584d246280c4d33cc025 (patch)
tree914226b8c8fffd1a8e101e71d361d6d126322c12 /src/nm-dispatcher
parentf03946fe0cdd73041658be1009f06f0e287c4b80 (diff)
parent34bb501be08aa2b313d88e67d6e0a7e0a3f9cfa6 (diff)
Update upstream source from tag 'upstream/1.47.90'
Update to upstream version '1.47.90'
with Debian dir fca683c43690f5e2bfc191d3d528666444bec54b
Diffstat (limited to 'src/nm-dispatcher')
-rw-r--r--src/nm-dispatcher/README.md15
-rw-r--r--src/nm-dispatcher/nm-dispatcher.c3
2 files changed, 18 insertions, 0 deletions
diff --git a/src/nm-dispatcher/README.md b/src/nm-dispatcher/README.md
new file mode 100644
index 00000000..53c8c709
--- /dev/null
+++ b/src/nm-dispatcher/README.md
@@ -0,0 +1,15 @@
+nm-dispatcher
+=============
+
+Runs as a D-Bus activated, exit-on-idle service to execute
+user scripts (dispatcher scripts) on certain events.
+
+The user does not directly configure this service, it gets
+controlled by NetworkManager. However, the user (or other
+applications) would place scripts in certain directories for
+the dispatcher service to execute them.
+
+The systemd service is called `NetworkManager-dispatcher.service`.
+
+See:
+- `man 8 NetworkManager-dispatcher` ([[www]](https://networkmanager.dev/docs/api/latest/NetworkManager-dispatcher.html))
diff --git a/src/nm-dispatcher/nm-dispatcher.c b/src/nm-dispatcher/nm-dispatcher.c
index efb4ec00..ce252b92 100644
--- a/src/nm-dispatcher/nm-dispatcher.c
+++ b/src/nm-dispatcher/nm-dispatcher.c
@@ -306,6 +306,9 @@ build_result_options(char *stdout)
     char                          *key;
     char                          *value;
 
+    if (!stdout)
+        return NULL;
+
     lines = g_strsplit(stdout, "\n", 65);
 
     for (i = 0; lines[i] && i < 64; i++) {