diff options
author | Thomas Haller <thaller@redhat.com> | 2014-06-17 19:11:56 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-17 19:15:31 +0200 |
commit | 02747203c6212b0a35e86f4a3b21a0d632b78afc (patch) | |
tree | 3ccde0bac8869c29040e9a6762674974c08df205 /callouts/nm-dispatcher.c | |
parent | 589272facfe68afaf2bf434d79a270d53175830d (diff) | |
download | NetworkManager-02747203c6212b0a35e86f4a3b21a0d632b78afc.tar.gz |
dispatcher: silence warning about sub-directories in dispatcher directory
Especially now that we have the 'pre-up.d/' and 'pre-down.d/' directories,
silently skip over any sub directories inside the dispatcher directory.
Fixes warning:
nm-dispatcher: Cannot execute '/etc/NetworkManager/dispatcher.d/pre-up.d': not a regular file.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'callouts/nm-dispatcher.c')
-rw-r--r-- | callouts/nm-dispatcher.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index 57e4ac3c1d..733af511fb 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -454,6 +454,8 @@ find_scripts (const char *str_action) err = stat (path, &st); if (err) g_warning ("Failed to stat '%s': %d", path, err); + else if (S_ISDIR (st.st_mode)) + ; /* silently skip. */ else if (!check_permissions (&st, &err_msg)) g_warning ("Cannot execute '%s': %s", path, err_msg); else { |