#!/bin/sh
# simple shell script wrapper for lsb-libchk
# Stew Benedict <sbenedict@mandriva.com>
# 12/30/04 - first version - 0.1
# 2/16/05 - combine common functions, use waivers

RPMPKG=lsb-libchk
ARCH=`rpm --eval %{_host_cpu} | sed 's|^i6|i4|'`
TESTBIN=/opt/lsb/bin/lsblibchk

# common functions
. /usr/share/lsb/common-functions

install_rpm lsb

retrieve_rpm $RPMPKG

$TESTBIN > /dev/null || exit 1
JOURNAL=journal.libchk

report_results $JOURNAL

if [ -n "$JOURNAL" ]; then
	if $TJREPORT $JOURNAL | grep -q 'FAIL: 0'; then
		exit 0
	else
		$TJREPORT $JOURNAL
	fi
else
	echo "No journal file..."
fi
