testenv: Be more careful deleting environment tmpfiles
authorVolker Lendecke <vl@samba.org>
Mon, 20 Jan 2020 20:19:40 +0000 (21:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 21 Jan 2020 14:38:43 +0000 (14:38 +0000)
If there is more than one server we will have for example nt4_dc.smbd,
nt4_dc.nmbd and nt4_dc.winbind as daemon environments, together with
the commandline environment "nt4_dc" coming last. Before this patch we
would have deleted all previous tmpfiles in the commandline environment.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/in_screen

index 5aba08d4750c440db2c573996b45c7e0d8f8bccb..9a99a3acf7f2f3293cc486cbfac65a79e6fce56e 100755 (executable)
@@ -29,7 +29,7 @@ fi
     done
 }
 
-rm -f $basedir/$SERVERNAME.*
+rm -f $basedir/$SERVERNAME.{launch,log,parent.pid,pid,status}
 
 # set most of the environment vars we have in the screen session too
 _ENV=""
@@ -66,7 +66,6 @@ cleanup() {
     exit 1
 }
 
-rm -f $basedir/$SERVERNAME.status $basedir/$SERVERNAME.log
 echo $$ > $basedir/$SERVERNAME.parent.pid
 trap cleanup SIGINT SIGTERM SIGPIPE