Skip to content

Commit

Permalink
fix(dracut.sh): handle symlinks appropriately while using '-i' option
Browse files Browse the repository at this point in the history
[[ -d $symlink ]] will return true if the symlink points to a directory.
So the symlink will not be copied, instead a directory is created with
the symlink name and the content is copied.

Signed-off-by: Kairui Song <kasong@redhat.com>
  • Loading branch information
ryncsn authored and haraldh committed Jun 29, 2021
1 parent f113801 commit c7fbc0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ for ((i = 0; i < ${#include_src[@]}; i++)); do
shopt -q -s dotglob
for objectname in "$src"/*; do
[[ -e $objectname || -L $objectname ]] || continue
if [[ -d $objectname ]]; then
if [[ -d $objectname ]] && [[ ! -L $objectname ]]; then
# objectname is a directory, let's compute the final directory name
object_destdir=${destdir}/${objectname#$src/}
if ! [[ -e $object_destdir ]]; then
Expand Down

0 comments on commit c7fbc0c

Please sign in to comment.