summaryrefslogtreecommitdiffstats
path: root/inf.pl
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2017-08-30 09:44:35 +0100
committerroot <root@lamia.panaceas.james.local>2017-08-30 09:44:35 +0100
commit7f265ce9981cd6a1e71bd676dadb3f8f508f1363 (patch)
treec3988a650ac44b4a8e95a4b139116dff8405569b /inf.pl
parent2f5198c9c915eba865663623fecc7970730efc08 (diff)
downloadinf-7f265ce9981cd6a1e71bd676dadb3f8f508f1363.tar.gz
inf-7f265ce9981cd6a1e71bd676dadb3f8f508f1363.tar.bz2
inf-7f265ce9981cd6a1e71bd676dadb3f8f508f1363.zip
tidy and proxy support for ILO2
Diffstat (limited to 'inf.pl')
-rwxr-xr-xinf.pl8
1 files changed, 5 insertions, 3 deletions
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);