Browse Source

fix(dracut.sh): handle symlinks appropriately while using '-i' option

[[ -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>
master
Kairui Song 4 years ago committed by Harald Hoyer
parent
commit
c7fbc0c890
  1. 2
      dracut.sh

2
dracut.sh

@ -2071,7 +2071,7 @@ for ((i = 0; i < ${#include_src[@]}; i++)); do @@ -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

Loading…
Cancel
Save