dracut-functions: inst_dir() handle relative symlinks

master
Harald Hoyer 2011-10-20 13:04:30 +02:00
parent 44cef0d563
commit b01885338b
1 changed files with 4 additions and 4 deletions

View File

@ -290,12 +290,12 @@ inst_dir() {
inst_dir "$target"
inst_symlink "$_file"
else
[[ -h ${initdir}$_file ]] && _file=$(readlink "${initdir}$_file")
[[ -h ${initdir}/$_file ]] && _file=$(readlink "${initdir}/$_file")
# 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
chmod --reference="$_file" "${initdir}$_file"
chmod u+w "${initdir}$_file"
chmod --reference="$_file" "${initdir}/$_file"
chmod u+w "${initdir}/$_file"
fi
fi
done