chiark / gitweb /
allow RUN to send the environment to a local socket
[elogind.git] / udev.c
diff --git a/udev.c b/udev.c
index 4096b8b..2a6e1ef 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -123,8 +123,12 @@ int main(int argc, char *argv[], char *envp[])
                struct name_entry *name_loop;
 
                dbg("executing run list");
-               list_for_each_entry(name_loop, &udev.run_list, node)
-                       execute_program(name_loop->name, udev.subsystem, NULL, 0, NULL);
+               list_for_each_entry(name_loop, &udev.run_list, node) {
+                       if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
+                               pass_env_to_socket(&name_loop->name[strlen("socket:")], devpath, action);
+                       else
+                               execute_program(name_loop->name, udev.subsystem, NULL, 0, NULL);
+               }
        }
 
        udev_cleanup_device(&udev);