#!/bin/sh

# First check for existence of /etc/brand file
FILE=/etc/brand
 
if [ ! -f "$FILE" ];
then
   
  dmidecode | grep 'Product Name:' | grep -ie 'hp' -ie 'compaq' | awk '{print $3}' | tr 'A-Z' 'a-z' > /etc/brand
  RET=$?

  if [ "$RET" = "0" ]; then
    exit 0
  else
    echo "Error: Did not find expected branding info in the DMI table"
    rm /etc/brand
    exit 1
  fi
fi

