summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2010-01-10 13:20:42 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2010-01-10 13:20:42 +0000
commit0591615e994f4d9210090ef4f3dfe8b22b1b933c (patch)
tree0724595c3e3ec91345d7fd86731f8bffd734e855 /usr.sbin
parent483309944758a41f2fea4f8eef9628a9296f721b (diff)
Make hotplugd to not complain if any of attach or detach script
doesn't exist. ok stsp@ deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/hotplugd/hotplugd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/hotplugd/hotplugd.c b/usr.sbin/hotplugd/hotplugd.c
index ba6e83977e2..412b1125474 100644
--- a/usr.sbin/hotplugd/hotplugd.c
+++ b/usr.sbin/hotplugd/hotplugd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hotplugd.c,v 1.11 2009/06/26 01:06:04 kurt Exp $ */
+/* $OpenBSD: hotplugd.c,v 1.12 2010/01/10 13:20:41 grange Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -142,8 +142,9 @@ exec_script(const char *file, int class, char *name)
snprintf(strclass, sizeof(strclass), "%d", class);
- if (access(file, X_OK | R_OK)) {
- syslog(LOG_ERR, "could not access %s", file);
+ if (access(file, X_OK | R_OK) == -1) {
+ if (errno != ENOENT)
+ syslog(LOG_ERR, "%s: %m", file);
return;
}