update to rearrange name in case USER is blank, which apparently it
authorChris Koeritz <fred@gruntose.com>
Mon, 12 Mar 2012 00:20:17 +0000 (20:20 -0400)
committerChris Koeritz <fred@gruntose.com>
Mon, 12 Mar 2012 00:20:17 +0000 (20:20 -0400)
can be.

scripts/security/tell_zooty_our_ip.sh

index 9c5b02a1fe1daddb5fac60d059a079a09a101f41..f227d7905a51c4e0be70563d37ebf3f57da84574 100644 (file)
@@ -17,7 +17,7 @@ if [ ! -z "$1" ]; then
   soundfile=$1
 fi
 
-ip_file="$(mktemp ${tempdir}/$(hostname | sed -e "s/\..*$//")_ip.XXXXXX)_${USER}"
+ip_file="$(mktemp ${tempdir}/ip_${USER}_$(hostname | sed -e "s/\..*$//").XXXXXX)"
 
 # get live ip address
 pushd $tempdir
@@ -38,5 +38,7 @@ cd gen
 put $ip_file $(hostname | sed -e "s/\..*$//")_ip.txt
 eof
 
+\rm -f "$ip_file"
+
 popd