From: Eric Bollengier Date: Tue, 21 Oct 2008 15:28:51 +0000 (+0000) Subject: ebl Try to fix Expect on ubuntu and suppress echo mode X-Git-Tag: Release-3.0.0~734 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=601c570cced8fc96dba67b759d2b4fa266844d4e;p=bacula%2Fbacula ebl Try to fix Expect on ubuntu and suppress echo mode git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7867 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bconsole.pm b/gui/bweb/lib/Bconsole.pm index 808b5518f3..9344e547e5 100644 --- a/gui/bweb/lib/Bconsole.pm +++ b/gui/bweb/lib/Bconsole.pm @@ -171,6 +171,8 @@ sub connect $SIG{__DIE__} = $sav; } + $self->{bconsole}->slave->stty(qw(-echo)); + unless ($ret) { return $self->error($self->{bconsole}->error()); } @@ -202,9 +204,9 @@ sub send_cmd unless ($self->connect()) { return ''; } - $self->send("$cmd\n"); - $self->expect_it($cmd); $self->{bconsole}->clear_accum(); + $self->send("$cmd\n"); +# $self->expect_it($cmd); $self->expect_it('-re',qr/^[*]/); return $self->before(); } @@ -218,9 +220,9 @@ sub send_cmd_yes $self->send("$cmd\n"); $self->expect_it('-re', '[?].+:'); - $self->send("yes\n"); - $self->expect_it("yes"); $self->{bconsole}->clear_accum(); + $self->send("yes\n"); +# $self->expect_it("yes"); $self->expect_it('-re',qr/^[*]/); return $self->before(); } @@ -250,8 +252,8 @@ sub label_barcodes $self->expect_it('-re', '[?].+\).*:'); my $res = $self->before(); $self->send("yes\n"); - $self->expect_it("yes"); - $res .= $self->before(); +# $self->expect_it("yes"); +# $res .= $self->before(); $self->expect_it('-re',qr/^[*]/); $res .= $self->before(); return $res; @@ -450,6 +452,7 @@ my $c = new Bconsole(pref => { print "fileset : ", join(',', $c->list_fileset()), "\n"; print "job : ", join(',', $c->list_job()), "\n"; print "storage : ", join(',', $c->list_storage()), "\n"; +print $c->label_barcodes(pool => 'Scratch', drive => 0, storage => 'LTO3', slots => '45'); #print "prune : " . $c->prune_volume('000001'), "\n"; #print "update : " . $c->send_cmd('update slots storage=SDLT-1-2, drive=0'), "\n"; #print "label : ", join(',', $c->label_barcodes(storage => 'SDLT-1-2',