]> err.no Git - systemd/commitdiff
run_program: log "info" not "error" if program is missing
authorScott James Remnant <scott@ubuntu.com>
Wed, 16 May 2007 18:06:39 +0000 (20:06 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 16 May 2007 18:06:39 +0000 (20:06 +0200)
udev_utils_run.c

index c9bbc97bad2a53c424178fa6765401fb47bd508b..8137ec1c66168530f615069ecd97c4560ad2ffb6 100644 (file)
@@ -158,9 +158,13 @@ int run_program(const char *command, const char *subsystem,
                        close(errpipe[WRITE_END]);
                }
                execv(argv[0], argv);
-
-               /* we should never reach this */
-               err("exec of program '%s' failed", argv[0]);
+               if ((errno == ENOENT) || (errno = ENOTDIR)) {
+                       /* may be on a filesytem which is not mounted right now */
+                       info("program '%s' not found", argv[0]);
+               } else {
+                       /* other problems */
+                       err("exec of program '%s' failed", argv[0]);
+               }
                _exit(1);
        case -1:
                err("fork of '%s' failed: %s", argv[0], strerror(errno));