chiark / gitweb /
service: change default stdout/stderr to syslog
[elogind.git] / src / modules-load.c
index fac4511816011f7e6e65d089c223c5b07cbeeac4..4b3b12109c311d237f057a48247a0bd08c44a12d 100644 (file)
@@ -46,6 +46,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         if (!(arguments = strv_new("/sbin/modprobe", "-sab", "--", NULL))) {
                 log_error("Failed to allocate string array");
                 goto finish;
@@ -53,13 +55,14 @@ int main(int argc, char *argv[]) {
 
         n_arguments = n_allocated = 3;
 
-        files = conf_files_list(".conf",
-                                "/run/modules-load.d",
-                                "/etc/modules-load.d",
-                                "/usr/lib/modules-load.d",
-                                NULL);
-        if (files == NULL) {
-                log_error("Failed to enumerate modules-load.d files: %m");
+        if (conf_files_list(&files, ".conf",
+                            "/run/modules-load.d",
+                            "/etc/modules-load.d",
+                            "/usr/local/lib/modules-load.d",
+                            "/usr/lib/modules-load.d",
+                            "/lib/modules-load.d",
+                            NULL) < 0) {
+                log_error("Failed to enumerate modules-load.d files: %s", strerror(-r));
                 goto finish;
         }