scripts: fix dcache script for Solaris machines

Solaris machines do not support any options to the hostname
command, unlike Linux machines.  The result is that calls like
'hostname -s' will set the hostname to '-s'.  To get the short
host name, we must filter the output.

Target: master
Request: 2.7
Request: 2.6
Request: 2.2