mirror of
https://github.com/thomas-krenn/check_lsi_raid.git
synced 2026-10-28 10:31:34 +01:00
Only add sudo if not already root
This commit is contained in:
1 parent
c00f1e8b3c
commit
ec8e40a0cc
1 file changed
+3
-1
+3
-1
@@ -1245,7 +1245,9 @@ MAIN: {
|
||||
print "Error: cannot find sudo executable.\n";
|
||||
exit(STATE_UNKNOWN);
|
||||
}
|
||||
$storcli = $sudo.' '.$storcli;
|
||||
if($> != 0){
|
||||
$storcli = $sudo.' '.$storcli;
|
||||
}
|
||||
}
|
||||
}
|
||||
# Print storcli version if available
|
||||
|
||||
Reference in new issue
Block a user