From ea20169a38b555288416cdcbd86d4cd83b380b8b Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 4 Nov 2014 15:49:00 -0500 Subject: Use a better method of finding disks for SMART. Old code was inaccurate and also listed entries that were symlinks to other disks --- usr/local/www/diag_smart.php | 3 +-- usr/local/www/widgets/widgets/smart_status.widget.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_smart.php b/usr/local/www/diag_smart.php index 2cbc60b..a8bfd3e 100644 --- a/usr/local/www/diag_smart.php +++ b/usr/local/www/diag_smart.php @@ -276,8 +276,7 @@ switch($action) { // Default page, prints the forms to view info, test, etc... 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\|ada\)[0-9]\{1,2\}$'", $devs); + $devs = get_smart_drive_list(); ?> diff --git a/usr/local/www/widgets/widgets/smart_status.widget.php b/usr/local/www/widgets/widgets/smart_status.widget.php index 746e78d..f02c531 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"); 0) { foreach($devs as $dev) { ## for each found drive do -- cgit v1.1