diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2008-05-25 16:49:05 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2008-05-25 16:49:05 +0000 |
commit | b233c3a1ff6b091ece3665b0d7c385128fd1ab7a (patch) | |
tree | c883acfa5326842b64a4be0c27eb7675736f1484 | |
parent | acf20edd5663502b0bc3faa8d42af1084c6a9b62 (diff) |
- chat to syslog if the script file can't be read or executed.
ok otto@
-rw-r--r-- | usr.sbin/hotplugd/hotplugd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/hotplugd/hotplugd.c b/usr.sbin/hotplugd/hotplugd.c index 546372e686e..bd6c1627ee8 100644 --- a/usr.sbin/hotplugd/hotplugd.c +++ b/usr.sbin/hotplugd/hotplugd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hotplugd.c,v 1.8 2008/05/12 19:15:02 pyr Exp $ */ +/* $OpenBSD: hotplugd.c,v 1.9 2008/05/25 16:49:04 jasper Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -141,9 +141,10 @@ exec_script(const char *file, int class, char *name) snprintf(strclass, sizeof(strclass), "%d", class); - if (access(file, X_OK | R_OK)) - /* do nothing if file can't be accessed */ + if (access(file, X_OK | R_OK)) { + syslog(LOG_ERR, "could not access %s", file); return; + } if ((pid = fork()) == -1) { syslog(LOG_ERR, "fork: %m"); |