From 2089fffc068d319b52de68300ae9354f650f8709 Mon Sep 17 00:00:00 2001 From: jasper Date: Sun, 25 May 2008 16:49:04 +0000 Subject: - chat to syslog if the script file can't be read or executed. ok otto@ --- usr.sbin/hotplugd/hotplugd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/hotplugd') 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 * @@ -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"); -- cgit v1.2.3-59-g8ed1b