Browse Source

dracut-functions: inst_dir() handle relative symlinks

master
Harald Hoyer 14 years ago
parent
commit
b01885338b
  1. 8
      dracut-functions

8
dracut-functions

@ -290,12 +290,12 @@ inst_dir() {
inst_dir "$target" inst_dir "$target"
inst_symlink "$_file" inst_symlink "$_file"
else else
[[ -h ${initdir}$_file ]] && _file=$(readlink "${initdir}$_file") [[ -h ${initdir}/$_file ]] && _file=$(readlink "${initdir}/$_file")
# create directory # create directory
mkdir -m 0755 -p "${initdir}$_file" || return 1 [[ -e "${initdir}/$_file" ]] || mkdir -m 0755 -p "${initdir}/$_file" || return 1
if [[ -d "$_file" ]]; then if [[ -d "$_file" ]]; then
chmod --reference="$_file" "${initdir}$_file" chmod --reference="$_file" "${initdir}/$_file"
chmod u+w "${initdir}$_file" chmod u+w "${initdir}/$_file"
fi fi
fi fi
done done

Loading…
Cancel
Save