diff options
author | Jim P <jim@pingle.org> | 2013-07-30 09:46:24 -0700 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2013-07-30 09:46:24 -0700 |
commit | 24f76a63f4cb4b28d4fba2a2d9f9c0b71ca5023f (patch) | |
tree | 1c06db37e71b9d1cdd0cace8d50dc3e579f3a085 | |
parent | 8bfc329f05db4a1163b528cf3c45033ecfcaaec2 (diff) | |
parent | 9ca01b5f54f3607faf6d96523d6c4c106f813b01 (diff) | |
download | pfsense-24f76a63f4cb4b28d4fba2a2d9f9c0b71ca5023f.zip pfsense-24f76a63f4cb4b28d4fba2a2d9f9c0b71ca5023f.tar.gz |
Merge pull request #747 from razzfazz/tighten-smart-regex-master
tighten overly broad regexes for SMART monitoring
-rw-r--r-- | usr/local/www/diag_smart.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/smart_status.widget.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/diag_smart.php b/usr/local/www/diag_smart.php index 3d982df..d7e8072 100644 --- a/usr/local/www/diag_smart.php +++ b/usr/local/www/diag_smart.php @@ -277,7 +277,7 @@ switch($action) { default: { // Get all AD* and DA* (IDE and SCSI) devices currently installed and stores them in the $devs array - exec("ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'", $devs); + exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> diff --git a/usr/local/www/widgets/widgets/smart_status.widget.php b/usr/local/www/widgets/widgets/smart_status.widget.php index 0459401..669a9c0 100644 --- a/usr/local/www/widgets/widgets/smart_status.widget.php +++ b/usr/local/www/widgets/widgets/smart_status.widget.php @@ -42,7 +42,7 @@ require_once("/usr/local/www/widgets/include/smart_status.inc"); <?php $devs = array(); ## Get all adX, daX, and adaX (IDE, SCSI, and AHCI) devices currently installed -exec("ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'", $devs); ## From SMART status page +exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs); ## From SMART status page if(count($devs) > 0) { foreach($devs as $dev) { ## for each found drive do |