Index: cloud-init/cloudinit/util.py =================================================================== --- cloud-init.orig/cloudinit/util.py +++ cloud-init/cloudinit/util.py @@ -145,7 +145,8 @@ def getkeybyid(keyid,keyserver): def runparts(dirp, skip_no_exist=True): if skip_no_exist and not os.path.isdir(dirp): return - + if os.path.isdir(dirp) and os.listdir(dirp) == []: return + cmd = [ 'run-parts', '--regex', '.*', dirp ] sp = subprocess.Popen(cmd) sp.communicate()