mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-09 14:39:35 +00:00
keep locale for vncshell and spiceshell
use the new keeplocale parameter from run_command and do not delete the LANG and LANGUAGE variable for the vncshell Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f536f691ab
commit
b0d4b407d8
@ -702,12 +702,12 @@ __PACKAGE__->register_method ({
|
|||||||
eval {
|
eval {
|
||||||
foreach my $k (keys %ENV) {
|
foreach my $k (keys %ENV) {
|
||||||
next if $k eq 'PVE_VNC_TICKET';
|
next if $k eq 'PVE_VNC_TICKET';
|
||||||
next if $k eq 'PATH' || $k eq 'TERM' || $k eq 'USER' || $k eq 'HOME';
|
next if $k eq 'PATH' || $k eq 'TERM' || $k eq 'USER' || $k eq 'HOME' || $k eq 'LANG' || $k eq 'LANGUAGE';
|
||||||
delete $ENV{$k};
|
delete $ENV{$k};
|
||||||
}
|
}
|
||||||
$ENV{PWD} = '/';
|
$ENV{PWD} = '/';
|
||||||
|
|
||||||
PVE::Tools::run_command($cmd, errmsg => "vncterm failed");
|
PVE::Tools::run_command($cmd, errmsg => "vncterm failed", keeplocale => 1);
|
||||||
};
|
};
|
||||||
if (my $err = $@) {
|
if (my $err = $@) {
|
||||||
syslog ('err', $err);
|
syslog ('err', $err);
|
||||||
|
@ -178,9 +178,7 @@ sub run_spiceterm {
|
|||||||
$ENV{PWD} = '/';
|
$ENV{PWD} = '/';
|
||||||
$ENV{SPICE_TICKET} = $ticket;
|
$ENV{SPICE_TICKET} = $ticket;
|
||||||
|
|
||||||
# run_command sets LC_ALL, so we use system() instead
|
PVE::Tools::run_command($cmd, errmsg => 'spiceterm failed\n', keeplocale => 1);
|
||||||
system(@$cmd) == 0 ||
|
|
||||||
die "spiceterm failed\n";
|
|
||||||
};
|
};
|
||||||
if (my $err = $@) {
|
if (my $err = $@) {
|
||||||
syslog ('err', $err);
|
syslog ('err', $err);
|
||||||
|
Loading…
Reference in New Issue
Block a user