Symlinks to directories are ignored when processing feature files
If some myfeature.files
includes a path which is a symlink to a directory, we would expect that symlink to be included in the initramfs. At present, however, it is not due to the checks in feature_files()
:
for file in $glob; do
if [ -d $file ]; then
find $file -type f
elif [ -e "$file" ]; then
echo $file
fi
done
The [ -d $file ]
check returns true: a symlink to a directory is essentially a directory; however, find $file -type f
echoes nothing. We would like these symlinks to fall through to the [ -e "$file" ]
case, where the symlink is echoed as we desire.
A fix is to replace if [ -d $file ]; then
with if [ -d $file ] && [ ! -L $file ]; then
Edited by Nathaniel Hourt