diff options
author | jasper <jasper@openbsd.org> | 2008-05-25 16:49:04 +0000 |
---|---|---|
committer | jasper <jasper@openbsd.org> | 2008-05-25 16:49:04 +0000 |
commit | 2089fffc068d319b52de68300ae9354f650f8709 (patch) | |
tree | 253fac0820293d4b17559887528032d51d72b0de /usr.sbin/hotplugd | |
parent | Fix whitespace and comment. (diff) | |
download | wireguard-openbsd-2089fffc068d319b52de68300ae9354f650f8709.tar.xz wireguard-openbsd-2089fffc068d319b52de68300ae9354f650f8709.zip |
- chat to syslog if the script file can't be read or executed.
ok otto@
Diffstat (limited to 'usr.sbin/hotplugd')
-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"); |