diff options
author | Harald Hoyer <harald@redhat.com> | 2011-10-20 13:04:30 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-10-20 13:06:53 +0200 |
commit | b01885338bb0b3daa087f71cfbf895e999e90b9f (patch) | |
tree | eebe6d32f26f3bc3ae01158562e8946a0c20a951 | |
parent | 44cef0d5637f5f6982612d22c92f6d299ec316f9 (diff) | |
download | dracut-b01885338bb0b3daa087f71cfbf895e999e90b9f.tar.gz dracut-b01885338bb0b3daa087f71cfbf895e999e90b9f.tar.bz2 dracut-b01885338bb0b3daa087f71cfbf895e999e90b9f.zip |
dracut-functions: inst_dir() handle relative symlinks
-rwxr-xr-x | dracut-functions | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dracut-functions b/dracut-functions index 1ef5269d..70a467be 100755 --- a/dracut-functions +++ b/dracut-functions @@ -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 |