add -s option for short hostnames

this is based on the submission from  e-minguez, but moves the short
host output into the preceding 'if primary' block to prevent problems on
hosts with multiple interfaces on the given network.

closes #3