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
|
@ -64,10 +64,10 @@ is_func() {
|
|||
# Log initrd creation.
|
||||
if ! [[ $dracutlogfile ]]; then
|
||||
[[ $dracutbasedir = /usr/share/dracut ]] && \
|
||||
dracutlogfile=/var/log/dracut.log || \
|
||||
dracutlogfile=$HOME/dracut.log
|
||||
if [[ -w $dracutlogfile ]]; then
|
||||
>"$dracutlogfile"
|
||||
dracutlogfile=/var/log/dracut.log || \
|
||||
dracutlogfile=$HOME/dracut.log
|
||||
if [[ -w ${dracutlogfile%/*} ]]; then
|
||||
>>"$dracutlogfile"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue