From ee950ca8a25e387bdb1893b5dd54847fee476e0d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Dec 2021 15:43:12 -0500 Subject: [PATCH] Skip directories in initramfs symlink If part of a debug effort leaves stray directories, ignore them as they can't possibly be initramfs content. --- confluent_server/confluent/osimage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 2131ffcb..dd3c1381 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -658,6 +658,8 @@ def generate_stock_profiles(defprofile, distpath, targpath, osname, yout.write(profdata) for initrd in os.listdir('{0}/initramfs'.format(defprofile)): fullpath = '{0}/initramfs/{1}'.format(defprofile, initrd) + if os.path.isdir(fullpath): + continue os.symlink(fullpath, '{0}/boot/initramfs/{1}'.format(dirname, initrd)) os.symlink(