mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
IPsec: Do not interpret $? as error code of move()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Tested-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
6688e0bc7a
commit
aec1c53cf1
@@ -2042,9 +2042,8 @@ END
|
||||
unlink ($filename);
|
||||
goto VPNCONF_ERROR;
|
||||
} else {
|
||||
move($filename, "${General::swroot}/certs/$cgiparams{'NAME'}cert.pem");
|
||||
if ($? ne 0) {
|
||||
$errormessage = "$Lang::tr{'certificate file move failed'}: $!";
|
||||
unless (move($filename, "${General::swroot}/certs/$cgiparams{'NAME'}cert.pem")) {
|
||||
$errormessage = "$Lang::tr{'certificate file move failed'} ($filename): $!";
|
||||
unlink ($filename);
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user