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