From 7f265ce9981cd6a1e71bd676dadb3f8f508f1363 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 30 Aug 2017 09:44:35 +0100 Subject: tidy and proxy support for ILO2 --- inf.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'inf.pl') diff --git a/inf.pl b/inf.pl index fe9d4a1..6c6481d 100755 --- a/inf.pl +++ b/inf.pl @@ -12,15 +12,16 @@ sub view($$) { my ( $inf, $port ) = @_; $inf->view($port); + $inf->logout; exit(0); } - sub media($$) { my ( $inf, $port ) = @_; $inf->media($port); + $inf->logout; exit(0); } @@ -37,7 +38,6 @@ sub thing($$$$) { my $name = $inf->name_get(); my $port_name = $inf->port_name_get($port); - view( $inf, $port ) if $thing eq 'view'; media( $inf, $port ) if $thing eq 'media'; @@ -83,6 +83,7 @@ sub thing($$$$) { } else { print "Command failed\n"; + $inf->logout; exit(1); } @@ -104,6 +105,8 @@ sub thing($$$$) { and ( not( $s =~ /Pending/ ) ) and ( $s =~ /$looke/i ) ); + $inf->logout; + } sub thing_search($$$$) { @@ -116,7 +119,6 @@ sub thing_search($$$$) { my $n = $inf->port_count(); - for ( my $i = 1 ; $i <= $n ; ++$i ) { my $port = $inf->port_id_get_by_number($i); my $o = $inf->port_name_get($port); -- cgit v1.2.3