X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fdumpjournal.sh;h=9316676c738c4e19f1cbefbed8d80371e68b432e;hb=refs%2Ftags%2Flamprey%2F12.1.18;hp=fdbe036a7fa743e089966f96192f2fac3d78d01a;hpb=a30c5cbe2cd374d529bf92f3f79ce4ffb4db3c42;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/dumpjournal.sh b/common/scripts/dumpjournal.sh index fdbe036..9316676 100755 --- a/common/scripts/dumpjournal.sh +++ b/common/scripts/dumpjournal.sh @@ -19,6 +19,18 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -journalctl -a --no-pager +if [ -x ./artiproxy-upload.sh ];then + DUMP_FILE=/tmp/dump + SYSTEMD_COLORS=false journalctl -a --no-pager > $DUMP_FILE + ./artiproxy-upload.sh $DUMP_FILE dumpjournal + # still dump to output if any error arise + if [ $? -eq 0 ];then + exit 0 + fi +else + echo "No upload, fallback to dump to console" +fi + +SYSTEMD_COLORS=false journalctl -a --no-pager echo "dumpjournal: pass" exit 0