dracut-functions: check if directory of logfile is writable

Do not check, if the logfile itsself is writable. Check the directory
instead.
master
Harald Hoyer 2011-03-07 12:59:29 +01:00
parent 58dad7025b
commit ee89f47453
1 changed files with 4 additions and 4 deletions

View File

@ -66,8 +66,8 @@ if ! [[ $dracutlogfile ]]; then
[[ $dracutbasedir = /usr/share/dracut ]] && \
dracutlogfile=/var/log/dracut.log || \
dracutlogfile=$HOME/dracut.log
if [[ -w $dracutlogfile ]]; then
>"$dracutlogfile"
if [[ -w ${dracutlogfile%/*} ]]; then
>>"$dracutlogfile"
fi
fi