Create and remove the temporary file within the same block of code.
authorZdeněk Šustr <sustr4@cesnet.cz>
Mon, 27 Feb 2012 14:22:20 +0000 (14:22 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Mon, 27 Feb 2012 14:22:20 +0000 (14:22 +0000)
org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh

index b387be2..ea1066a 100755 (executable)
@@ -418,13 +418,13 @@ EOF
                                        printf "$VOMSCERT\n$VOMSCA\n" > /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc
 
                                        printf "Generated /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc\n$NL"
+
+                                       rm $VOMSHOSTONLY.$$.DNs.txt
                                else
                                        printf "/etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc already exists\n$NL"
                                fi
 
 #                              cat /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc | sed "s/\$/$NL/"
-
-                               rm $VOMSHOSTONLY.$$.DNs.txt
                        fi
                done