mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-28 16:36:30 +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 {
|
||||
foreach my $k (keys %ENV) {
|
||||
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};
|
||||
}
|
||||
$ENV{PWD} = '/';
|
||||
|
||||
PVE::Tools::run_command($cmd, errmsg => "vncterm failed");
|
||||
PVE::Tools::run_command($cmd, errmsg => "vncterm failed", keeplocale => 1);
|
||||
};
|
||||
if (my $err = $@) {
|
||||
syslog ('err', $err);
|
||||
|
@ -178,9 +178,7 @@ sub run_spiceterm {
|
||||
$ENV{PWD} = '/';
|
||||
$ENV{SPICE_TICKET} = $ticket;
|
||||
|
||||
# run_command sets LC_ALL, so we use system() instead
|
||||
system(@$cmd) == 0 ||
|
||||
die "spiceterm failed\n";
|
||||
PVE::Tools::run_command($cmd, errmsg => 'spiceterm failed\n', keeplocale => 1);
|
||||
};
|
||||
if (my $err = $@) {
|
||||
syslog ('err', $err);
|
||||
|
Loading…
Reference in New Issue
Block a user