All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 609ca2e0 authored by Brian Kroth's avatar Brian Kroth

fixups, also add use strict/warnings to find others

parent e2c5c93d
......@@ -40,9 +40,12 @@
package power_ilo;
use strict;
use warnings;
use Exporter;
@ISA = ("Exporter");
@EXPORT = qw( iloctrl );
our @ISA = ("Exporter");
our @EXPORT = qw( iloctrl );
use lib "@prefix@/lib";
use libdb;
......@@ -121,7 +124,7 @@ sub iloctrl($$@) {
}
}
elsif ($krole eq "ipmi-kgkey") {
$kgkey = $row->{'mykey'} =~ s/^0x//;
($kgkey = $row->{'mykey'}) =~ s/^0x//;
# NOTE: key_privlvl is currently ignored in case this is the
# only authentication mechanism being used.
}
......@@ -288,11 +291,11 @@ sub iloexec($$$$$$$;$) {
$SIG{'ALRM'} = sub {
$SIG{'PIPE'} = 'IGNORE';
$SIG{'CHLD'} = 'IGNORE';
kill(INT,$pid);
kill('INT',$pid);
select(undef,undef,undef,0.1);
kill(TERM,$pid);
kill('TERM',$pid);
select(undef,undef,undef,0.1);
kill(KILL,$pid);
kill('KILL',$pid);
die "iloexec($node_id) timed out in ssh!";
};
......@@ -337,7 +340,7 @@ sub iloexec($$$$$$$;$) {
# Talk to ssh over the pty: wait for expected output and send responses
#
my @lines = ();
foreach $es (@expect_seq) {
foreach my $es (@expect_seq) {
my ($rval,$sval) = @$es;
my $found = 0;
......@@ -397,7 +400,7 @@ sub iloexec($$$$$$$;$) {
}
sleep(1);
}
kill(KILL,$pid) if (!$dead);
kill('KILL',$pid) if (!$dead);
# if we get here, things probably went ok...
return 0;
......@@ -460,7 +463,7 @@ sub ipmiexec($$$$$$$;$$$) {
# XXX IPMI takes about 40 seconds to timeout and doesn't
# have an option to control?!
my $privlvl_args = ($key_privlvl) ? " -L $key_privlvl" : '';
my $privlvl_args = ($privlvl) ? " -L $privlvl" : '';
my $ipmicmd = "ipmitool -I $iface -H $IP -U $key_uid $privlvl_args -E -K power $cmd";
print "*** Executing '$ipmicmd', output:\n"
if ($debug > 1);
......
......@@ -98,7 +98,7 @@ sub new($$$;$) {
}
}
elsif ($role eq "ipmi-kgkey") {
$self->{KGKEY} = $row->{'mykey'} =~ s/^0x//;
($self->{KGKEY} = $row->{'mykey'}) =~ s/^0x//;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment