@@ -126,8 +126,7 @@ public function onRunJob() {
126126 * Check, if we have mpt-status installed (LSIsoftware-raid)
127127 */
128128 if (file_exists ('/proc/mpt/summary ' )) {
129- system ('which mpt-status ' , $ retval );
130- if ($ retval === 0 ) {
129+ if ($ app ->system ->is_installed ('mpt-status ' )) {
131130 /*
132131 * Fetch the output
133132 */
@@ -174,8 +173,7 @@ public function onRunJob() {
174173 /*
175174 * 3ware Controller
176175 */
177- system ('which tw_cli ' , $ retval );
178- if ($ retval === 0 ) {
176+ if ($ app ->system ->is_installed ('tw_cli ' )) {
179177
180178 // TYPOWORX FIX | Determine Controler-ID
181179 $ availableControlers = shell_exec ('tw_cli info | grep -Eo "c[0-9]+" ' );
@@ -232,8 +230,7 @@ public function onRunJob() {
232230 /*
233231 * HP Proliant
234232 */
235- system ('which hpacucli ' , $ retval );
236- if ($ retval === 0 ) {
233+ if ($ app ->system ->is_installed ('hpacucli ' )) {
237234 $ state = 'ok ' ;
238235 $ data ['output ' ] = shell_exec ('/usr/sbin/hpacucli ctrl all show config ' );
239236 $ tmp = explode ("\n" , $ data ['output ' ]);
@@ -298,8 +295,7 @@ public function onRunJob() {
298295 /*
299296 * Adaptec-RAID
300297 */
301- system ('which arcconf ' , $ retval );
302- if ($ retval === 0 ) {
298+ if ($ app ->system ->is_installed ('arcconf ' )) {
303299 $ state = 'ok ' ;
304300 $ data ['output ' ] = shell_exec ('arcconf GETCONFIG 1 LD ' );
305301 if (is_array ($ data ['output ' ])) {
0 commit comments