
BEGIN { FS = "[-:; ]+" }

{
  IFFY = 0;

  if ($1 != "Board" || $2 != "ID") next;

  for (i = 1 ; i <= NF; i++) 
  {
    if ( $i == "PN") { PN1 = $(i+1); PN2 = $(i+2); PN3 = $(i+3) }
    if ( $i == "DN") { DN = $(i+1) }
    if ( $i == "SN") { SN = $(i+1); BD = substr(SN,3,6) }
  }

#  print  "partnum is " PN1 "_" PN2 "_" PN3
#  print  "dnum is " DN
#  print  "sernum is " SN
#  print  "blddate is " BD


  if (PN1 == 415 && PN2 == 17) 
  {
# There's an inconsistency somewhere; either a typo here
# or perhaps in the card docs.  EC0(zero) seems to be the
# correct string.  ECO(oh) is kept in for paranoia's sake.
    if (PN3 <= 4 && DN != "ECO11019" && DN != "EC011019")
      IFFY = 1
    if (PN3 == 5 && BD < 200838)
      IFFY = 1
  }

  if (IFFY) 
  {
#    print "The Infiniband card must be set to SDR" 
    exit 2
  }

  exit 1
}
