We should avoid using /tmp in selftest
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 23 13:53:13 UTC 2024 on atb-devel-224
}
}
if ($opt_add) {
- print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = /tmp\n";
+ my $tmpdir = "/tmp";
+ if (defined($ENV{TMPDIR})) {
+ $tmpdir = $ENV{TMPDIR};
+ }
+ print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = $tmpdir\n";
}
close (CONFIGFILE);
close (CONFIGFILE_NEW);