From 4c74203366dd0e9023a8a2b20a901dfb6d207d77 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Fri, 14 Feb 2014 14:09:39 -0600 Subject: [PATCH] kpatch-build: log to /tmp --- kpatch-build/kpatch-build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index cc4a885..e80dc1a 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -23,7 +23,7 @@ # - Runs kpatch tools to create and link the patch kernel module BASE="$PWD" -LOGFILE="$PWD/kpatch-build.log" +LOGFILE="/tmp/kpatch-build-$(date +%s).log" TOOLSDIR="$(readlink -f $(dirname $0))" ARCHVERSION="$(uname -r)" DISTROVERSION="${ARCHVERSION%*.*}" @@ -40,8 +40,7 @@ cleanup() { } die() { - echo "ERROR: kpatch build failed" >&2 - echo "check kpatch-build.log for more details" >&2 + echo "ERROR: kpatch build failed. Check kpatch-build.log for more details." >&2 exit 1 } @@ -166,5 +165,5 @@ strip -d "kpatch-$PATCHNAME.ko" >> "$LOGFILE" 2>&1 || die cp -f "$TEMPDIR/patch/kpatch-$PATCHNAME.ko" "$TEMPDIR/core/kpatch.ko" "$BASE" || die -echo "SUCCESS" cleanup +echo "SUCCESS"