[pve-devel] [PATCH] reset tty when return form pct enter.
Wolfgang Link
w.link at proxmox.com
Wed Sep 16 13:31:13 CEST 2015
this is necessary to reactivate the echo of the input at some containers.
---
src/PVE/CLI/pct.pm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
index 8c56f89..f8eac2e 100755
--- a/src/PVE/CLI/pct.pm
+++ b/src/PVE/CLI/pct.pm
@@ -14,6 +14,7 @@ use PVE::API2::LXC;
use PVE::API2::LXC::Config;
use PVE::API2::LXC::Status;
use PVE::API2::LXC::Snapshot;
+use PVE::Tools;
use Data::Dumper;
@@ -95,7 +96,8 @@ __PACKAGE__->register_method ({
# test if container exists on this node
PVE::LXC::load_config($param->{vmid});
- exec('lxc-attach', '-n', $param->{vmid});
+ system('lxc-attach', '-n', $param->{vmid});
+ exec('stty sane');
}});
__PACKAGE__->register_method ({
@@ -121,7 +123,9 @@ __PACKAGE__->register_method ({
if (!@{$param->{'extra-args'}}) {
die "missing command";
}
- exec('lxc-attach', '-n', $param->{vmid}, '--', @{$param->{'extra-args'}});
+
+ system('lxc-attach', '-n', $param->{vmid}, '--', @{$param->{'extra-args'}});
+ exec('stty sane');
}});
our $cmddef = {
--
2.1.4
More information about the pve-devel
mailing list