X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=dracut-logger.sh;h=e72716ff3d2c247df10de1b440b06764101ff588;hb=c27ed38bb2986d31b08257782ce2b24a80415c6c;hp=e5c93586d1e306c256b864ada3d30cee39ff47fd;hpb=e50f91e6004a523d745179eaa789e28a75ff06d4;p=thirdparty%2Fdracut.git diff --git a/dracut-logger.sh b/dracut-logger.sh index e5c93586d..e72716ff3 100755 --- a/dracut-logger.sh +++ b/dracut-logger.sh @@ -148,8 +148,7 @@ dlog_init() { && type -P systemd-cat &>/dev/null \ && systemctl --quiet is-active systemd-journald.socket &>/dev/null \ && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then - readonly _dlogdir="$(mktemp -p "$TMPDIR/" -d -t dracut-log.XXXXXX)" - readonly _systemdcatfile="$_dlogdir/systemd-cat" + readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat" mkfifo "$_systemdcatfile" readonly _dlogfd=15 systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" & @@ -324,7 +323,7 @@ _do_dlog() { local msg="$*" local lmsg="$lvlc: $*" - (( $lvl <= $stdloglvl )) && echo "$msg" >&2 + (( $lvl <= $stdloglvl )) && printf -- 'dracut: %s\n' "$msg" >&2 if (( $lvl <= $sysloglvl )); then if [[ "$_dlogfd" ]]; then