The following scripts work on Lion to grab the Model Identifier and also to strip out all but the Model Identifier Version number. To assist in the creation of smart groups, I'd recommend making the Model ID version number an integer. These have been tested under Mac OS X Lion only.
Good Luck and happy reconnoitering.
Model Identifier:
#!/bin/sh
echo "<result>$(system_profiler SPHardwareDataType | grep "Model Identifier" | awk '{print $3}')</result>"
Model Identifier Version number:
#!/bin/sh
echo "<result>$(system_profiler SPHardwareDataType | grep "Model Identifier" | tr -d [A-Z][a-z]:' ' | awk -F , '{print $1}')</result>"