changequote(,)dnl #!/bin/ksh # $Id: uinfo.host,v 1.9 2008/10/26 18:53:16 ksb Exp $ # Report the "uname -snrm" for the host (ksb,gcr) # #****p* netlint/uinfo # NAME # uinfo # DESCRIPTION # Netlint reports the common terms for the uname(1) command across most # UNIX-like OSs. We also report which master source distrib.cf file was used # to push netint to the host. # IMPACT # These values are used largely to tune site policy for a host. #*** PROGNAME=`basename $0 .ksh` : ${CARP:=echo} if [ _-V = _$1 ] ; then echo "$PROGNAME: "'$Id: uinfo.host,v 1.9 2008/10/26 18:53:16 ksb Exp $' exit 0 fi #****a* uinfo/UINFO_UNAME # NAME # UINFO_UNAME # FORMAT # UINFO_UNAME: system name release processor # DESCRIPTION # Some parameters idealized from the output of uname(1), made to be as common # as possible. # REMEDIATION # There should be no remediation for this attribute, unless it is wrong. #*** # UINFO_UNAME: $operating_system $name $release $hardware set _ `uname -snrm` case _"$2" in _AIX) set _ "`uname -p`" "$3" "`uname -v`.$4" "`uname -M`" ;; _Linux) if [ -s /etc/redhat-release ]; then V=`sed -n -e 's,.*[ ]\([^ ]*\)[ ](.*,\1,p' /dev/null` ;; _Linux) V=`uname -r 2>/dev/null` ;; _FreeBSD) V=`uname -i 2>/dev/null` ;; esac [ -z "$V" ] || ${CARP} "UINFO_KERNEL: $V" #****a* uinfo/UINFO_CF # NAME # UINFO_CF # FORMAT # UINFO_CF: file.cf # DESCRIPTION # The value of NETLINT_UINFO in the distrib configuration file that sent the # netlint program to the client node. #*** ifdef(NETLINT_UINFO,$CARP UINFO_CF: NETLINT_UINFO) exit 0 dnl