dracut-functions: check if directory of logfile is writable
Do not check, if the logfile itsself is writable. Check the directory instead.master
parent
58dad7025b
commit
ee89f47453
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue