mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-27 17:55:47 +03:00
dracut-logger.sh: check is journald.socket is active
before using systemd-cat, make sure someone is listening
This commit is contained in:
parent
cb73315dd6
commit
6a877a79c4
@ -141,7 +141,10 @@ dlog_init() {
|
||||
fi
|
||||
|
||||
if (( $sysloglvl > 0 )); then
|
||||
if [[ -d /run/systemd/journal ]] && type -P systemd-cat &>/dev/null && (( $UID == 0 )) ; then
|
||||
if [[ -d /run/systemd/journal ]] \
|
||||
&& type -P systemd-cat &>/dev/null \
|
||||
&& (( $UID == 0 )) \
|
||||
&& systemctl is-active systemd-journald.socket &>/dev/null; then
|
||||
readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)"
|
||||
readonly _systemdcatfile="$_dlogdir/systemd-cat"
|
||||
mkfifo "$_systemdcatfile"
|
||||
|
Loading…
Reference in New Issue
Block a user