diff --git a/cloudinit/subp.py b/cloudinit/subp.py index ca8be1057b9..c94b44e7db1 100644 --- a/cloudinit/subp.py +++ b/cloudinit/subp.py @@ -379,13 +379,15 @@ def runparts(dirp, skip_no_exist=True, exe_prefix=None): except ProcessExecutionError as e: LOG.debug(e) failed.append(exe_name) - else: + elif os.path.isfile(exe_path): LOG.warning( "skipping %s as its not executable " "or the underlying file system is mounted without " "executable permissions.", exe_path, ) + else: + LOG.debug("Not executing special file [%s]", exe_path) if failed and attempted: raise RuntimeError(