Not strange, but unfortunate. If you are root the result will always be uname -n, together with a warning that you shouldn't run the script as root. If not a number of other methods will be used to to determine the host name. The reason is that one of the methods is "hostname --fqdn" and that will _set_ the hostname to "--fqdn" on some OS.
I suspect this will fix it:
--- client.sh~ 2008-06-29 05:28:08.000000000 +0200 +++ client.sh 2009-07-11 01:01:27.000000000 +0200 @@ -209,7 +209,7 @@ echo "WARNING: You are running client.sh as root. Don't do that!" >&2 else if hostname --fqdn >/dev/null 2>&1; then tmp_node=`hostname --fqdn` - if [ X$tmp_node != Xlocalhost.localdomain ]; then + if [ X$tmp_node != Xlocalhost.localdomain -o X$tmp_node != Xlocalhost ]; then cur_node=$tmp_node fi else