You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: ESRY, D. (ATTSI) <de...@at...> - 2009-11-09 17:16:40
|
Try something like: $exp->send("atdt $number\r"); $exp->expect($timeout, [ qr/CONNECT/], [ qr/NO CARRIER/], [ qr/ANSWER/], [ qr/NODIALTONE/], [ qr/BUSY/], [ qr/ERROR/], [ qr/PROTOCOL/], [ qr/Password/], [ qr/Login ID/], [ qr/Cannot open/] ); if ( ($exp->match() =~ m/NO CONNECT/) || ($exp->match() =~ m/NO CARRIER/) || ($exp->match() =~ m/ANSWER/) || ($exp->match() =~ m/NODIALTONE/) || ($exp->match() =~ m/BUSY/) || ($exp->match() =~ m/ERROR/) ) { print("\nCan't connect\n"); } elsif ($exp->match() =~ m/CARRIER RX/) { print("\nConnected...\n"); } -----Original Message----- From: avonnieda [mailto:ad...@vo...] Sent: Friday, November 06, 2009 2:20 PM To: exp...@li... Subject: [Expectperl-discuss] How to make an expect string optional Hi Folks, I have one line in a program I'm automating that will prompt sometimes, not always. How can I make an expect line "optional". In other words, ignore this block if you don't see the string before the timeot is reached. Here's the block I want to make optional. $expect->expect($timeout,"Do you want to preserve the port number"); $expect->send("n\n"); Thanks very much for any insight. -Adam -- View this message in context: http://old.nabble.com/How-to-make-an-expect-string-optional-tp26230867p26230 867.html Sent from the Perl - Expectperl-Discuss mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: avonnieda <ad...@vo...> - 2009-11-06 19:20:00
|
Hi Folks, I have one line in a program I'm automating that will prompt sometimes, not always. How can I make an expect line "optional". In other words, ignore this block if you don't see the string before the timeot is reached. Here's the block I want to make optional. $expect->expect($timeout,"Do you want to preserve the port number"); $expect->send("n\n"); Thanks very much for any insight. -Adam -- View this message in context: http://old.nabble.com/How-to-make-an-expect-string-optional-tp26230867p26230867.html Sent from the Perl - Expectperl-Discuss mailing list archive at Nabble.com. |
From: Satish P. <sat...@gm...> - 2009-11-03 15:04:05
|
Hi, I am not sure if you have already found the solution. If not, you can try this. after issuing the command, you can wait (expect) for the prompt and then issue the command <variable>=$exp->before(); this will assign the output of previous command to variable. Regards, Satish On Fri, Oct 30, 2009 at 3:11 AM, Erich Kuehn <wav...@gm...> wrote: > This is probably a newbie question, but for the life of me I cant figure > out how to do this. > > I have a perl script which logs onto a device and issues some commands, > very simple. > > One of the commands gives back a list ip addresses and some other cruft. I > want to parse that list and do dns lookups on each of the ip's (using host > or dig or some other shell command) > > I cant seem to get the output to assign to a variable so I can then run it > through loop to get the dns names. > > Here is what I have. > > Thanks > > Erich > > > #!/usr/local/bin/perl -w > use strict; > use Expect; > use Getopt::Long; > Getopt::Long::Configure("bundling"); > > $ENV{TERM} = 'vt100'; > > sub display_output { > my ($output) = @_; > if ($output !~ > /(Copyright|Connection|exit|login|Password|Trying..|Connected|Escape|auto)/ > ) { > print $output; > } > return 1; > } > > sub nexus_expect { > my ($platform, $hostname) = @_; > my $timeout = 5; > my $exp = Expect->spawn("telnet -K $hostname"); > $exp->log_stdout(0); # dont display the whole thing, using the log_file > $exp->log_file(\&display_output); > $exp->expect($timeout, > [ 'ogin: $' => sub { > $exp->send("*********\n"); > exp_continue; } > ], > [ 'assword: $' => sub { > $exp->send("**********\n"); > exp_continue; } > ], > '-re', qr'[#>:] $' > ); > $exp->send(" \n"); > $exp->expect(5, '-re', qr'[#>] $' => sub { $exp->send(" terminal length > 0\n"); } ); > $exp->send(" \n"); > $exp->send(" \n"); > > *#This is where I try to assign the output to the array @hosts* > my @hosts = $exp->expect(10, '-re', qr'[#>] $' => sub { $exp->send(" show > ip int bri | grep proto\n"); } ); > $exp->send(" \n"); > $exp->expect(5, '-re', qr'[#] $' => sub {$exp->close(); }); > $exp->close(); > foreach (@hosts) { > chomp; > my ($int, $ip, $stat) = split( /\s+/,$_); > $a = `host $ip\n`; > print "$a\n"; > } > > print "\n"; > return 1; > } > > sub cisco_expect { > # nothing here for now > return 1; > } > > sub usage { > print "\nUsage:\t"; > print "./1-qa -p [nexus|cisco] -h <hostname>\n"; > print "\n"; > exit 0; > } > > sub main { > my $stat = ""; > my $int = ""; > my $ip = ""; > my $a = ""; > my $platform = ""; > my $hostname = ""; > my @hosts = ""; > GetOptions( > "platform|p=s" => \$platform, > "hostname|h=s" => \$hostname > ) or usage; > > if ($platform ne "nexus" && $platform ne "cisco") { > usage; > } > if ($hostname eq "") { > usage; > } > if ($platform eq "nexus") { > nexus_expect($platform,$hostname); > } > } > main(); > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > |
From: Erich K. <wav...@gm...> - 2009-10-29 21:41:21
|
This is probably a newbie question, but for the life of me I cant figure out how to do this. I have a perl script which logs onto a device and issues some commands, very simple. One of the commands gives back a list ip addresses and some other cruft. I want to parse that list and do dns lookups on each of the ip's (using host or dig or some other shell command) I cant seem to get the output to assign to a variable so I can then run it through loop to get the dns names. Here is what I have. Thanks Erich #!/usr/local/bin/perl -w use strict; use Expect; use Getopt::Long; Getopt::Long::Configure("bundling"); $ENV{TERM} = 'vt100'; sub display_output { my ($output) = @_; if ($output !~ /(Copyright|Connection|exit|login|Password|Trying..|Connected|Escape|auto)/ ) { print $output; } return 1; } sub nexus_expect { my ($platform, $hostname) = @_; my $timeout = 5; my $exp = Expect->spawn("telnet -K $hostname"); $exp->log_stdout(0); # dont display the whole thing, using the log_file $exp->log_file(\&display_output); $exp->expect($timeout, [ 'ogin: $' => sub { $exp->send("*********\n"); exp_continue; } ], [ 'assword: $' => sub { $exp->send("**********\n"); exp_continue; } ], '-re', qr'[#>:] $' ); $exp->send(" \n"); $exp->expect(5, '-re', qr'[#>] $' => sub { $exp->send(" terminal length 0\n"); } ); $exp->send(" \n"); $exp->send(" \n"); *#This is where I try to assign the output to the array @hosts* my @hosts = $exp->expect(10, '-re', qr'[#>] $' => sub { $exp->send(" show ip int bri | grep proto\n"); } ); $exp->send(" \n"); $exp->expect(5, '-re', qr'[#] $' => sub {$exp->close(); }); $exp->close(); foreach (@hosts) { chomp; my ($int, $ip, $stat) = split( /\s+/,$_); $a = `host $ip\n`; print "$a\n"; } print "\n"; return 1; } sub cisco_expect { # nothing here for now return 1; } sub usage { print "\nUsage:\t"; print "./1-qa -p [nexus|cisco] -h <hostname>\n"; print "\n"; exit 0; } sub main { my $stat = ""; my $int = ""; my $ip = ""; my $a = ""; my $platform = ""; my $hostname = ""; my @hosts = ""; GetOptions( "platform|p=s" => \$platform, "hostname|h=s" => \$hostname ) or usage; if ($platform ne "nexus" && $platform ne "cisco") { usage; } if ($hostname eq "") { usage; } if ($platform eq "nexus") { nexus_expect($platform,$hostname); } } main(); |
From: Tom C. <tom...@me...> - 2009-09-10 14:31:51
|
Hopefully, someone that has experienced this same issue has found a resolution... I'm driving a perl expect script on a Solaris box through a remote execution daemon on the box. The perl expect script is performing SFTP. The expect trace shows the following error: Error: could not connect pty as controlling terminal! When performing Public key Authentication, the script successfully performs its work even though the error occurs. However, when performing Password Authentication the password prompt is never received when the 'keyboard-interactive' auth method is performed. I need to support both Public Key and Password authentication. When I run the perl expect script manually from a shell prompt on the Solaris box (not through the remote execution daemon), Password Authentication is successful and no error occurs. The 'could not connect pty as controlling terminal' error does NOT occur on Linux when executing through the remote execution daemon...it's only an issue on Solaris. Is there a way to resolve this on Solaris??? Thanks in advance for any assistance, Tom |
From: Jerry K. <je...@ie...> - 2009-09-08 14:07:42
|
Markdown.pl is a Perl text-processing filter which takes input from stdin and outputs to stdout. I'd like to call it as a child process from within my script -- pass it a string and get a string back. My first attempt is to use open2(), but after failing and reading perldoc perlipc carefully I realized my problem is that, like most programs, Markdown.pl does not support "unbuffered" I/O. Advice in perldoc perlipc suggests using 'Expect' module. So, I try this code: #!/usr/bin/perl use Expect ; my $stdin = "*Hello* **World**\n" ; my $cmd = '/Users/jk/Downloads/Markdown_1.0.1/Markdown.pl'; my @parameters = () ; # No arguments to Markdown.pl my $exp = new Expect; $exp->raw_pty(1); $exp->spawn($cmd, @parameters) or die "Cannot spawn $command: $!\n"; $exp->send($stdin); print "Waiting for output.\n" ; my $stdout = $exp->expect(undef); print "stdout: $stdout\n" ; The result is "Waiting for output" -- forever. If I give the expect() function a timeout parameter, then it times out after the given time, but returns no data. Does anyone know how to use the Expect module in the simple case of spawning a command with stdin to get stdout? Maybe this is not appropriate. Although perldoc peripc recommends Expect for this problem, Expect documentation poo-poos such a usage: Question: "I just want to read the output of a process without expect()ing anything. How can I do this?" Answer: "[ Are you sure you need Expect for this? How about qx() or open("prog|")? ] That's what we call "the runaround". Should I give up and write my stdin to a temporary file? I know I can make that work but at this point curiosity and the need for closure has taken over ;) -- View this message in context: http://www.nabble.com/Can-use-Expect-to-spawn-a-process-with-stdin%2C-stdout--tp25346856p25346856.html Sent from the Perl - Expectperl-Discuss mailing list archive at Nabble.com. |
From: Powell, D. <DP...@ep...> - 2009-09-01 15:31:04
|
Hi: We are using perl v5.8.3 (with 8 registered patches) on HP-UX (B.11.23 ia64 architecture), and we're trying to use Expect to automate connection to a remote sftp server. For our testing, I am using Expect to send the password for us. For production, we have already sent public key credentials to the remote server, so there is no need to send a password -- authentication is done via public key. The following code snippet seems pretty standard, but it _always_ results in Expect returning a timeout condition: my $prompt = 'sftp>'; $ftp = new Expect; $ftp->raw_pty(1); $ftp->spawn("sftp", 'use...@xx...') or die "ERROR #1\n"; $ftp->expect($timeout, [qr{^Connecting to .*$} => sub {$ftp->exp_continue;}], [qr'password: ' => sub{$ftp->send("xxxxxxxxx\n");}], [timeout => sub { $okay = 0; $ftp->soft_close(); print "TIMEOUT\n"; }], $prompt ); die "ERROR: " . $ftp->error ."\n" if $ftp->error; When we run the script, the conversation looks like: use...@xx...'s password: TIMEOUT ERROR: -1 shell returned 22 I can confirm that the sftp> prompt appears before the TIMEOUT message is printed, so at that point we are connected to the remote server. Now, if I remove the timeout=> block, everything works fine. No timeout condition is called, and the rest of the script continues as normal. Is there a problem with the way the timeout block is coded, or is something wrong with the way Perl::Expect works on HP-UX? Any suggestions would be most appreciated. Best Regards, Dean Powell Edmonton, Canada This email message, including any attachments, is for the intended recipient(s) only, and contains confidential and proprietary information. Unauthorized distribution, copying or disclosure is strictly prohibited. If you have received this message in error, or are obviously not one of the intended recipients, please immediately notify the sender by reply email and delete this email message, including any attachments. Thank you. |
From: Turenne, J. <Jon...@St...> - 2009-07-16 13:06:25
|
Good Morning, As a newbie to 'Expect', I am having a few issues with my script. Having integrated it with Perl, I have parts of it that are working, and parts that are not. In any event, can someone answer the following for me? 1. When inside an expect statement, are these generally 'conditions', and are they evaluated from top to bottom? 2. Is it possible to 'break' out of this expect statement once I meet a certain condition? In my example code, you will see that I have an "exp_return" statement which is not valid. Essentially, I need to break out of the expect statement, and move on to the next item in the foreach loop. Thanks in advance! I have been combing the web & docs, and really don't see how to do it. Plus, since I am still at the VERY early stages of learning this, I really don't know what I am looking for -- I just know what I want to do. Here is the code: foreach $Host (sort @Hosts) { $CantPingHost = 0; chomp(@PingResult = `ping -w $PingTime $Host`); foreach my $line (@PingResult) { if ($line =~ m/.*100\% packet loss.*/) { $UnsuccessCount++; $CantPingCountv++; $GeneratePingList = 1; $CantPingHost = 1; push @UnpingableHosts, $Host; print " Can't ping host: '$Host' Skiping...\n"; last; } } next if ($CantPingHost); print "Changing password on: $Host\n"; $exp = new Expect(); $exp->debug($DegugState); $exp->spawn("ssh -X $User\@$Host"); $exp->expect($Timeout, '-re', [".*continue connecting.*", sub {$exp->send("yes\r"); exp_continue;}], [".*$User.*assword:.*", sub {$exp->send("$OldPaswd\r"); exp_continue;}], [".*TERM = .*", sub {$exp->send("vt100\r"); exp_continue;}], [".*$Host\s*:.*", sub {$exp->send("$paswd\r"); exp_continue;}], [".*ld ?assword:.*", sub {$exp->send("$OldPaswd\r"); exp_continue;}], [".*ew ?assword.*", sub {$exp->send("$NewPaswd\r"); $exp->send("exit\r"); exp_continue;} ], [".*assword was recently used.*", sub {$exp->send("exit\r"); $RecentPswd = 1; $UnsuccessCount++; push @RecentPswdNodes, $Host; exp_return;}] ); $exp->soft_close(); $SuccessCount++; } |
From: Sivasankari <rm...@sr...> - 2009-07-13 10:12:01
|
Hi, Thanks for your reply. I tried with the one you specified cpan -fi Net::Z3950::ZOOM. I tried with http://krishnanm.com/khh/resources , which gives instruction to reconfigure cpan and then i tried to install the zoom module Again it shows the error ==SCREEN OUPUT=== Running install for module 'Net::Z3950::ZOOM' Running make for M/MI/MIRK/Net-Z3950-ZOOM-1.25.tar.gz Has already been unwrapped into directory /root/.cpan/build/Net-Z3950-ZOOM-1.25-zyzKPg '/usr/bin/perl Makefile.PL' returned status 512, won't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install ==SCREEN OUPUT=== Kindly help over this Net-Z3950-ZOOM module installation in Fedora10 Thanks Sivasankari m ----- Original Message ----- From: "P. Sunthar" <su...@ch...> To: "Krishnan M" <km...@ya...> Cc: <Ko...@li...>; "Sivasankari" <rm...@sr...> Sent: Saturday, July 11, 2009 10:56 PM Subject: Re: [Koha] Problem in Installation of KOHA-3.00.03 in fedora 10 Hi, We are not using zebra. (Ours is a small lib and threfore don't require this). As you rightly did, I also had to force install Zoom. Following are some tips from my own notes. cpan -fi Net::Z3950::ZOOM # repeated above more than once to get all dependencies installed # Archive-Zip-1.30.tar.gz was not found it iitb CPAN site # downloaded from net, untarred in /tmp make Makefile.PL make make install On the second part of your question: Web install takes place only after make install at command prompt. It is not independent of it. I used two guidelines for installation. 1. available in the koha root directory INSTALL.fedora7, and Krishnan's notes. It worked. Nothing specifically new. Sunthar. On Sat, 11 Jul 2009 22:14:42 +0530 (IST), Krishnan M <km...@ya...> wrote: > Hello Sivasankari, > > Sunthar in Mumbai told me a week ago that he successfully installed Koha 3 > on Fedora 10 using notes for a similar install for Fedora 9 that i provide > at http://krishnanm.com/khh/resources with a few departures. > > We intended to document these differences for a version of the install > HOW-TO for Fedora 10, but haven't done so yet. i am cc'ing Sunthar here and > requesting that he share his experience sooner rather than later, as i am > not sure if he's on the list. > > i remember that getting ZOOM to install is troublesome, but there's a > particular way to get around it, but don't quite remember what it is. > > regards, > krishnan > > --- On Sat, 11/7/09, Sivasankari <rm...@sr...> wrote: > > > From: Sivasankari <rm...@sr...> > Subject: [Koha] Problem in Installation of KOHA-3.00.03 in fedora 10 > To: Ko...@li... > Date: Saturday, 11 July, 2009, 12:15 PM > > > > > > Hi All, > I have asked a query mentioned below. > > The following fatal error has occurred:Can't locate ZOOM.pm in @INC > > Some of members have answered it. Thanks for those replies. > > Koha was already installed in my machine at /usr/shar/KOHA-3.00.03. - I > have already ran the perl Makefile.PL from the /usr/share/koha-3.00.03 > folder , then make,make test,make install and then web installer launched, > which shows the error in browser , can't locate zoom.pm in @Inc in the web > browser window > while i gave http::/<ipaddress>:80/ . > > > > > I started the process of installing the left over prerequisite module > Net::Z3950::ZOOM 1.16. Which needs yaz and zebra to be installed. I > searched and found the yaz rpm for fedora10, and installed yaz ( > yaz-3.0.34-1.fc10.i386.rpm). But for idzebra i dont find the rpm for > fedora10. it is available for fc6. Hence i downloaded > idzebra-2.0.8.tar.gz. unzipped it and ran the ./configure,Make,Make > install.. > > After this , I called > cpan > reload cpan . > > Now I gave > cpan > force install Net::Z3950::ZOOM > It shows the errors > > ====Screen output ========== > cpan[2]> force install Net::Z3950::ZOOM > Running install for module 'Net::Z3950::ZOOM' > Running make for M/MI/MIRK/Net-Z3950-ZOOM-1.25.tar.gz > Has already been unwrapped into directory > /root/.cpan/build/Net-Z3950-ZOOM-1.25-zyzKPg > '/usr/bin/perl Makefile.PL' returned status 512, won't make > Running make test > Make had some problems, won't test > Running make install > Make had some problems, won't install > =======Screen Output================ > > What shall i do? Will there be problem with installation of this module > with Fedora10. > I'm unable to launch koha with web installer. Since this essential module > is needed. Did i need to uninstall koha and start from beginning. > Or else can i run once again /usr/shar/KOHA-3.00.03.>perl Makefile.PL - > reinstalling koha directly. > > Kindly help me out on this. > Thanks in advance > Sivasankari > > > > > > > > > > > -----Inline Attachment Follows----- > > > _______________________________________________ > Koha mailing list > Ko...@li... > http://lists.katipo.co.nz/mailman/listinfo/koha > > > > Love Cricket? Check out live scores, photos, video highlights and > more. Click here http://cricket.yahoo.com -- P Sunthar http://www.che.iitb.ac.in/online/faculty/p-sunthar Asst. Professor Dept of Chemical Engg Ph:+91-22-2576 7229 Indian Institute of Technology Bombay P.Sunthar <at> iitb.ac.in Powai, Mumbai 400 076, INDIA |
From: Bryan B. <br...@bu...> - 2009-06-11 13:28:24
|
> I can not use this solution as I need to ssh and then perform many other > tests apart from telnet. So I can not use a single ssh just for telnet. > Killing it using PID requires us to login again using another ssh session > which is not the requirement, considering that there will be more than 1 > telnet tests I will be performing. > Sending $exp->send("\003") should work, but I am checking if any other > issue > is preventing this. > Is telnet hanging because the IP address is not online? It seems that is the behavior from my testing. Why not skip the telnet portions if it doesnt respond to ping? You could write echo statements on failure and expect against that: $ping_success = 1; $exp->send("ping -W 1 -c 3 $ip || echo PING_FAILED"); $exp->expect(5, [ "^PING_FAILED" => sub {$ping_success = 0; exp_continue;} ], $shell_prompt); if ( $ping_success ) { {do telnets here}; } Bryan Bueter http://sourceforge.net/projects/rover |
From: Satish P. <sat...@gm...> - 2009-06-11 03:30:12
|
I can not use this solution as I need to ssh and then perform many other tests apart from telnet. So I can not use a single ssh just for telnet. Killing it using PID requires us to login again using another ssh session which is not the requirement, considering that there will be more than 1 telnet tests I will be performing. Sending $exp->send("\003") should work, but I am checking if any other issue is preventing this. On Wed, Jun 10, 2009 at 4:27 PM, Roland Giersig <rgi...@cp...> wrote: > How about directly doing a > > "ssh -t -l $user $line telnet $telnetip $telnetport" > > and using close() (and maybe pid() and kill()) in case of timeout just > as Austin suggested? > > HTH, Roland > > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Roland G. <rgi...@cp...> - 2009-06-10 11:16:47
|
How about directly doing a "ssh -t -l $user $line telnet $telnetip $telnetport" and using close() (and maybe pid() and kill()) in case of timeout just as Austin suggested? HTH, Roland |
From: Robin L. P. <rlp...@di...> - 2009-06-09 16:40:50
|
On Tue, Jun 09, 2009 at 09:18:37AM -0700, Austin Schutz wrote: > On Tue, 9 Jun 2009 08:49:55 -0700 Robin Lee Powell > <rlp...@di...> wrote: > > > On Tue, Jun 09, 2009 at 01:22:05PM +0100, Ian Moor wrote: > > > Telnet and ssh both support escape characters which can > > > specified on the command line. Providing the escape characters > > > for ssh and telnet are different, send the telnet escape, when > > > you get the telnet prompt send the telnet command quit to > > > close the connection and exit telnet. > > > > We've been over that, I'm afraid; this is before the connection > > has succeeded. The escape key is ignored. At the commandline, > > ^C works in this state, but apparently not in his script. > > > > What happens if you close() it? what happens if you kill the > pid()? He's doing it through ssh, i.e. ssh to box X, telnet to box Y from there. -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" See http://shrunklink.com/cdiz http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Austin S. <te...@of...> - 2009-06-09 16:36:39
|
On Tue, 9 Jun 2009 08:49:55 -0700 Robin Lee Powell <rlp...@di...> wrote: > On Tue, Jun 09, 2009 at 01:22:05PM +0100, Ian Moor wrote: > > Telnet and ssh both support escape characters which can specified > > on the command line. Providing the escape characters for ssh and > > telnet are different, send the telnet escape, when you get the > > telnet prompt send the telnet command quit to close the connection > > and exit telnet. > > We've been over that, I'm afraid; this is before the connection has > succeeded. The escape key is ignored. At the commandline, ^C > works in this state, but apparently not in his script. > What happens if you close() it? what happens if you kill the pid()? Austin |
From: Robin L. P. <rlp...@di...> - 2009-06-09 15:50:07
|
On Tue, Jun 09, 2009 at 01:22:05PM +0100, Ian Moor wrote: > Telnet and ssh both support escape characters which can specified > on the command line. Providing the escape characters for ssh and > telnet are different, send the telnet escape, when you get the > telnet prompt send the telnet command quit to close the connection > and exit telnet. We've been over that, I'm afraid; this is before the connection has succeeded. The escape key is ignored. At the commandline, ^C works in this state, but apparently not in his script. -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" See http://shrunklink.com/cdiz http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ |
From: Ian M. <iw...@do...> - 2009-06-09 13:23:02
|
Pothuri, Satish K wrote: > Hi, > > > > I would appreciate if someone can help me with this. > > > > I am writing a script in Perl that uses expect feature to SSH to a > server and perform ping and telnet tests from that server. > > > > 1. Spawn SSH to a server > 2. Send commands for ping and telnet (one after another) to the > spawned command (SSH). > > > > My question is how I can interrupt/terminate the telnet process if it is > taking too long to complete. I am trying to send “\cC” (control – C) if > my expect times out waiting for something after sending the telnet > command, but it doesn’t seem to be working. > > Telnet and ssh both support escape characters which can specified on the command line. Providing the escape characters for ssh and telnet are different, send the telnet escape, when you get the telnet prompt send the telnet command quit to close the connection and exit telnet. Ian |
From: Robin L. P. <rlp...@di...> - 2009-06-09 05:37:51
|
On Mon, Jun 08, 2009 at 10:24:47PM -0700, Satish Pothuri wrote: > Below is the case where I want interrupt, I dont want to wait for > about 4 mins (telnet timeout). By hand I can do this using Ctrl-C, > but unable to perform the same through expect. > > # telnet 192.168.1.106 670 > Trying 192.168.1.106... > ------> pressed Ctrl-C here Huh. I don't know why that's not working. The best solution I can think of is making another ssh connection (since the telnet is running remotely, correct?) and sending a kill that way. -Robin |
From: Satish P. <sat...@gm...> - 2009-06-09 05:26:26
|
> > Thanks Robin for your prompt response. Yes, it does work in the scenario of successful telnet (by passing \c] through expect). But in case of failed telnet where it takes around 4 mins to (telnet) timeout, I want to interrupt the telnet if it is not successful within 30 seconds. I want to wait on expect for a string that indicates sucessful telnet for 30 seconds, if it is not successful (i.e., based on expect timeout), I would like to interrupt the telnet program. Below is the case where I want interrupt, I dont want to wait for about 4 mins (telnet timeout). By hand I can do this using Ctrl-C, but unable to perform the same through expect. # telnet 192.168.1.106 670 Trying 192.168.1.106... ------> pressed Ctrl-C here # Thank you. > > -----Original Message----- > From: Robin Lee Powell [mailto:rlp...@di...] > Sent: Monday, June 08, 2009 9:38 AM > To: Pothuri, Satish K > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Perl Expect - How to terminate a > commandthat was run using send > > On Sun, Jun 07, 2009 at 10:08:25PM -0700, Pothuri, Satish K wrote: > > Hi, > > > > > > > > I would appreciate if someone can help me with this. > > > > > > > > I am writing a script in Perl that uses expect feature to SSH to a > > server and perform ping and telnet tests from that server. > > > > > > > > 1. Spawn SSH to a server > > 2. Send commands for ping and telnet (one after another) to the > > spawned command (SSH). > > > > > > > > My question is how I can interrupt/terminate the telnet process if it > is > > taking too long to complete. I am trying to send "\cC" (control - C) > if > > my expect times out waiting for something after sending the telnet > > command, but it doesn't seem to be working. > > Telnet is a terminal emulator; it passes \cC to the remote side. > Try it on the command line; you'll see it doesn't work (assuming a > connection has been made). > > Try \c] followed by "exit" (or whatever command your telnet wants; > do ^] on a live connection by hand to see the menu). > > -Robin > |
From: Robin L. P. <rlp...@di...> - 2009-06-08 17:05:19
|
On Sun, Jun 07, 2009 at 10:08:25PM -0700, Pothuri, Satish K wrote: > Hi, > > > > I would appreciate if someone can help me with this. > > > > I am writing a script in Perl that uses expect feature to SSH to a > server and perform ping and telnet tests from that server. > > > > 1. Spawn SSH to a server > 2. Send commands for ping and telnet (one after another) to the > spawned command (SSH). > > > > My question is how I can interrupt/terminate the telnet process if it is > taking too long to complete. I am trying to send "\cC" (control - C) if > my expect times out waiting for something after sending the telnet > command, but it doesn't seem to be working. Telnet is a terminal emulator; it passes \cC to the remote side. Try it on the command line; you'll see it doesn't work (assuming a connection has been made). Try \c] followed by "exit" (or whatever command your telnet wants; do ^] on a live connection by hand to see the menu). -Robin |
From: Pothuri, S. K <spo...@vi...> - 2009-06-08 05:24:00
|
Hi, I would appreciate if someone can help me with this. I am writing a script in Perl that uses expect feature to SSH to a server and perform ping and telnet tests from that server. 1. Spawn SSH to a server 2. Send commands for ping and telnet (one after another) to the spawned command (SSH). My question is how I can interrupt/terminate the telnet process if it is taking too long to complete. I am trying to send "\cC" (control - C) if my expect times out waiting for something after sending the telnet command, but it doesn't seem to be working. sub log_in { my ($line,$userid,$passwd) = @_; my $exp = new Expect; my $command = "ssh -l $userid $line"; .................... ..................... ..................... ..................... $exp->send("telnet $telnetip $telnetport\n"); if($exp->expect(5, 'Escape character is')) { print "Telnet successful.\n"; $exp->send("\^]\n"); $exp->expect(30, 'telnet'); $exp->send("quit\r\n"); ................. ................. ................. ................. else { ............... ............... print "Telnet Failed.\n"; $exp->send("\cC\r"); =========> This is not working as expected. It does not terminate telnet process. I even tried hex and octal representations. if($exp->expect(5, $PROMPT)) Appreciate any help. Thanks in advance. Thanks Satish |
From: Ron S. <gee...@ya...> - 2009-05-12 16:09:12
|
--- On Sun, 5/10/09, Dhiren Chandvania <cd...@gm...> wrote: > From: Dhiren Chandvania <cd...@gm...> > Subject: [Expectperl-discuss] using expect to spawn a process on remote system > To: exp...@li... > Date: Sunday, May 10, 2009, 5:51 AM > Hi All, > > I am new to Expect and want to write a Perl program which > shall > spawn/interact with a remote program say e.g. xyz which has > interactive > promts. The remote system supports telnet to login. Can > someone send me the > perl code to achieve this? > > Many thanks in advance. > > > local system: > ---------------------- > ./abc.pl //this program has to spawn a > remote progrm "xyz" > and send interactive commands based on the prompts shown > below > > > > > remote system > ----------------------- > > ./xyz > > Do you wish to continue [Y/N]: > Are you sure [y]: > Enter your name: > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY > circumstances! Your > production scanning environment may not be a perfect world > - but thanks to > Kodak, there's a perfect scanner to get the job done! > With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even > with all image > processing features enabled. > http://p.sf.net/sfu/kodak-com_______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss You can get a get deal of information at: http://expect.nist.gov/ (Expect Home Page). Also, you may want to look into getting the definitive book on Expect: Exploring Expect by Don Libes published by O'Reilly. in a pinch, you can always Google "using Expect". There are scripts around that can/will give you a guideline to go by. Expect is a great tool, really powerfull and easy to use. Ron Smith gee...@ya... |
From: Dhiren C. <cd...@gm...> - 2009-05-10 12:51:14
|
Hi All, I am new to Expect and want to write a Perl program which shall spawn/interact with a remote program say e.g. xyz which has interactive promts. The remote system supports telnet to login. Can someone send me the perl code to achieve this? Many thanks in advance. local system: ---------------------- ./abc.pl //this program has to spawn a remote progrm "xyz" and send interactive commands based on the prompts shown below remote system ----------------------- ./xyz Do you wish to continue [Y/N]: Are you sure [y]: Enter your name: |
From: KhAoZ <xk...@gm...> - 2009-04-21 16:22:54
|
Yeah, I was expecting such an answer, just hoped I might get lucky with a quick hack. I'll show you my problems, but its really an ugly problem that I have to deal with since so much of the code base was written like this from my predecessor. What I'm doing right now is using expect to spawn a telnet connection to a remote server, and executing a bunch of tests. Because this is a telnet process, when I run commands, the only way to really see if the command has ended is to try and parse the shell output (Ie, looking for a "> "). Previously, most of the code looked for those special shell characters implying a command has finished, but that ended up being very unreliable, so I simply ran commands like this "command; echo RESULT $?", and I knew the command was finished when I saw RESULT \d+. Thus, my code was like this: $console->expect($timeout, [qr/RESULT (\d+)/ , sub { .. finished .. } ], .. command related expects .. This worked fine when RESULT would only appear at the end, but now the entire output of the command matched immediately, and the RESULT pattern would simply match right away and prevent any of the other expect patterns to match anything. The obvious solution here would be to put the RESULT pattern at the end. However, that breaks a lot of existing code base because a bunch of the patterns end up matching RESULT (Ie. ^(.+)$). I am only now thinking of making trying to change the whole expect<->telnet thing. I've looked at Net::SSH::Perl, but that seems like more for interaction with a user. Anyways, any ideas you have would be very helpful. Thanks for your help. Note: The two servers actually have identical specs, and have the exact same jumpstart images as well. There is probably something running on one of them that may be slowing it down a notch, but I am honestly amazed that each server can so reliably produce different behaviors. On Tue, Apr 21, 2009 at 11:55 AM, Roland Giersig <rgi...@cp...> wrote: > Hi, > > let me guess: the new machine is much faster than the old one? :-) > > Sorry, both behaviours are perfectly valid, you must not make any > assumptions about how fast the lines will arrive and when matching will > occur. And no, there is no way to force any line-reading behaviour upon > Expect, it always reads in chunks the way it gets them from the OS. > > So I'm afraid it really means going over the match-logic again and figure > out a way that works in any way. BTW, what problem did you have to "work > around"? Maybe you can post the relevant matching code so I can point out > problems? Maybe the solution is to split and/or combine expect() > statements... > > Best regards, > Roland > > KhAoZ wrote: >> >> I've been developing with Expect on this one system, and I have a huge >> code base that works perfectly fine on that server. However, I just >> tried moving to another server (of the exact spec and OS), and I'm >> getting a different behavior with the pattern matching with respect to >> the command accumulation. >> >> On the server that works, when I run a command, the pattern matching >> behavior is as follows: >> >> output line #1 >> -> try all patterns >> output line #1 >> output line #2 >> -> try all patterns >> output line #1 >> outline line #2 >> output line #3 >> -> try all patterns >> -> found a match >> output line #4 >> ... etc... >> >> However, on this other server, the following happens: >> >> output line #1 >> output line #2 >> output line #3 >> output line #4 >> output line #5 >> -> try all patterns >> >> All the output from the command is accumulated immediately, and then >> matched against the pattern, rather than matching every time a new >> line is echoed from the command. >> >> When I was developing on my original server, I built around the first >> scenario, and now a lot of my code is breaking because I seriously >> though thats how Expect worked: add one line to the accumulator each >> time, and try the patterns. I really don't want to rewrite and retest >> all the code so that it can work in both scenarios, is there anyway to >> force the behavior of scenario one? Does anyone have an idea why the >> behavior is different, is it maybe a system setting that can be >> changed (Perl 5.8.3 on Solaris 10 for both servers, except the first >> one is using an ActivePerl distribution). >> >> I tried seeing if turning Multi-line off would help remedy the >> situation, but that breaks a lot of code that makes use of $ and ^ in >> the patterns. I can provide debug logs or clarify exactly how this is >> breaking my code if anyone wishes. >> >> Any help is appreciated. >> >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and around Java >> (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. Use priority >> code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Expectperl-discuss mailing list >> Exp...@li... >> https://lists.sourceforge.net/lists/listinfo/expectperl-discuss >> > |
From: Roland G. <rgi...@cp...> - 2009-04-21 15:56:35
|
Hi, let me guess: the new machine is much faster than the old one? :-) Sorry, both behaviours are perfectly valid, you must not make any assumptions about how fast the lines will arrive and when matching will occur. And no, there is no way to force any line-reading behaviour upon Expect, it always reads in chunks the way it gets them from the OS. So I'm afraid it really means going over the match-logic again and figure out a way that works in any way. BTW, what problem did you have to "work around"? Maybe you can post the relevant matching code so I can point out problems? Maybe the solution is to split and/or combine expect() statements... Best regards, Roland KhAoZ wrote: > I've been developing with Expect on this one system, and I have a huge > code base that works perfectly fine on that server. However, I just > tried moving to another server (of the exact spec and OS), and I'm > getting a different behavior with the pattern matching with respect to > the command accumulation. > > On the server that works, when I run a command, the pattern matching > behavior is as follows: > > output line #1 > -> try all patterns > output line #1 > output line #2 > -> try all patterns > output line #1 > outline line #2 > output line #3 > -> try all patterns > -> found a match > output line #4 > ... etc... > > However, on this other server, the following happens: > > output line #1 > output line #2 > output line #3 > output line #4 > output line #5 > -> try all patterns > > All the output from the command is accumulated immediately, and then > matched against the pattern, rather than matching every time a new > line is echoed from the command. > > When I was developing on my original server, I built around the first > scenario, and now a lot of my code is breaking because I seriously > though thats how Expect worked: add one line to the accumulator each > time, and try the patterns. I really don't want to rewrite and retest > all the code so that it can work in both scenarios, is there anyway to > force the behavior of scenario one? Does anyone have an idea why the > behavior is different, is it maybe a system setting that can be > changed (Perl 5.8.3 on Solaris 10 for both servers, except the first > one is using an ActivePerl distribution). > > I tried seeing if turning Multi-line off would help remedy the > situation, but that breaks a lot of code that makes use of $ and ^ in > the patterns. I can provide debug logs or clarify exactly how this is > breaking my code if anyone wishes. > > Any help is appreciated. > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: KhAoZ <xk...@gm...> - 2009-04-21 14:01:16
|
I've been developing with Expect on this one system, and I have a huge code base that works perfectly fine on that server. However, I just tried moving to another server (of the exact spec and OS), and I'm getting a different behavior with the pattern matching with respect to the command accumulation. On the server that works, when I run a command, the pattern matching behavior is as follows: output line #1 -> try all patterns output line #1 output line #2 -> try all patterns output line #1 outline line #2 output line #3 -> try all patterns -> found a match output line #4 ... etc... However, on this other server, the following happens: output line #1 output line #2 output line #3 output line #4 output line #5 -> try all patterns All the output from the command is accumulated immediately, and then matched against the pattern, rather than matching every time a new line is echoed from the command. When I was developing on my original server, I built around the first scenario, and now a lot of my code is breaking because I seriously though thats how Expect worked: add one line to the accumulator each time, and try the patterns. I really don't want to rewrite and retest all the code so that it can work in both scenarios, is there anyway to force the behavior of scenario one? Does anyone have an idea why the behavior is different, is it maybe a system setting that can be changed (Perl 5.8.3 on Solaris 10 for both servers, except the first one is using an ActivePerl distribution). I tried seeing if turning Multi-line off would help remedy the situation, but that breaks a lot of code that makes use of $ and ^ in the patterns. I can provide debug logs or clarify exactly how this is breaking my code if anyone wishes. Any help is appreciated. |