#!/bin/sh
#  Copyright (c) 1997 Adobe Systems, Incorporated. All rights reserved.
#
# report some maybe-relevant system info
# called by FrameMaker when writing a crash log.

: ${FMHOME:?} ${FMARCH:?}	# call me as $FMHOME/bin/fmsysinfo, please

echo '
''=== OS Version Information Begin ==='
echo 'uname:' `uname -a`

# ibm.aix.pwr
# fussy about error checking here because "type" doesn't return
# nonzero on failure in some shells.
# The pattern match we're looking for is "oslevel is /bin/oslevel",
# but in a language-independent way
r=`type oslevel 2>/dev/null`
case "$? $r" in
'0 '*oslevel*oslevel*)
	echo 'oslevel:' `oslevel`
	;;
esac
echo '=== OS Version Information End ===''
'

echo '
''=== Environment Begin ==='
echo "DISPLAY=$DISPLAY""
""FMARCH=$FMARCH""
""FMHOME=$FMHOME""
""HOME=$HOME""
""LANG=$LANG""
""LD_LIBRARY_PATH=$LD_LIBRARY_PATH""
""PATH=$PATH""
""PRINTER=$PRINTER""
""XFILESEARCHPATH=$XFILESEARCHPATH"
echo '=== Environment End ===''
'

echo '
''=== xdpyinfo begin ==='
# fussy about error checking here because "type" doesn't return
# nonzero on failure in some shells.
# The pattern match we're looking for is "xdpyinfo is /usr/bin/X11/xdpyinfo",
# but in a language-independent way
r=`type xdpyinfo 2>/dev/null`
case "$? $r" in
'0 '*xdpyinfo*xdypinfo*)
	dsp=${DISPLAY+"-display $DISPLAY"}
	xdpyinfo $dsp
	;;
*)
	echo "no display info: PATH doesn't include xdpyinfo."
	;;
esac
echo '=== xdpyinfo end ===''
'

exit 0
