From: Harald Hoyer Date: Wed, 28 Aug 2013 18:01:54 +0000 (+0200) Subject: dracut-logger.sh: check is journald.socket is active X-Git-Tag: 033~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a877a79c4c94d4e6752c981559ac85f21073973;p=thirdparty%2Fdracut.git dracut-logger.sh: check is journald.socket is active before using systemd-cat, make sure someone is listening --- diff --git a/dracut-logger.sh b/dracut-logger.sh index 0c505e290..b052581e8 100755 --- a/dracut-logger.sh +++ b/dracut-logger.sh @@ -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"