Skip to content

Commit 45bdedf

Browse files
author
Nuno Tavares
committed
cosmetic: cleanup unused vars and trailing newlines
Signed-off-by: Nuno Tavares <[email protected]>
1 parent 9c0a982 commit 45bdedf

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

hpssacli.pl

+5-9
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
# These may need changing depending on the configuration of your system
2020
my $hpacucli = '/usr/sbin/hpssacli';
21-
my $sudo = '/usr/bin/sudo';
22-
my $hpacucli_cmd = "$hpacucli";
2321

2422
my ( $slot, $fh, $fh2 );
2523

@@ -50,8 +48,8 @@ sub add_metric {
5048
}
5149

5250
# Get controller status
53-
open( $fh, "$hpacucli_cmd controller all show status|" )
54-
or exp_exit( "Failed to run $hpacucli_cmd" );
51+
open( $fh, "$hpacucli controller all show status|" )
52+
or exp_exit( "Failed to run $hpacucli" );
5553

5654

5755
# Spin through output
@@ -69,7 +67,7 @@ sub add_metric {
6967
foreach my $PARAM (qw(array physicaldrive logicaldrive)) {
7068

7169
open( $fh2,
72-
"$hpacucli_cmd controller slot=$slot $PARAM all show status|"
70+
"$hpacucli controller slot=$slot $PARAM all show status|"
7371
)
7472
or exp_exit( "Failed to get info for $PARAM slot $slot" );
7573

@@ -89,7 +87,7 @@ sub add_metric {
8987

9088
# Now get further details on each physicaldrive
9189
open( $fh2,
92-
"$hpacucli_cmd controller slot=$slot physicaldrive all show detail|"
90+
"$hpacucli controller slot=$slot physicaldrive all show detail|"
9391
)
9492
or exp_exit( "Failed to get info for physicaldrive slot $slot" );
9593

@@ -142,6 +140,4 @@ sub add_metric {
142140
}
143141
}
144142
close($fh)
145-
or exp_exist("Failed to run $hpacucli_cmd controller all show status" );
146-
147-
143+
or exp_exist("Failed to run $hpacucli controller all show status" );

0 commit comments

Comments
 (0)