summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2016-02-14 12:48:44 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2016-02-14 12:48:44 -0600
commitb290833b28c3083a7cb5c8b3ec5060620274e2b9 (patch)
tree38af600694752a8d95769ce7f9f9b2b4c68f0219 /src
parent744e378727ec8f08547514e66563ce15b573e55e (diff)
parent921e237fdeecdf6a362b33afd1bbdd365aa350c6 (diff)
downloadpfsense-b290833b28c3083a7cb5c8b3ec5060620274e2b9.zip
pfsense-b290833b28c3083a7cb5c8b3ec5060620274e2b9.tar.gz
Merge pull request #2634 from nwholloway/eclfix_2_3
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/ecl.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/etc/ecl.php b/src/etc/ecl.php
index 15205f1..2e99d18 100755
--- a/src/etc/ecl.php
+++ b/src/etc/ecl.php
@@ -50,14 +50,9 @@ function get_swap_disks() {
function get_disk_slices($disk) {
global $g, $debug;
- $slices_array = array();
- $slices = trim(exec("/bin/ls " . escapeshellarg("/dev/" . $disk . "s*") . " 2>/dev/null"));
+ $slices = glob("/dev/" . $disk . "s*");
$slices = str_replace("/dev/", "", $slices);
- if ($slices == "ls: No match.") {
- return;
- }
- $slices_array = explode(" ", $slices);
- return $slices_array;
+ return $slices;
}
function get_disks() {
OpenPOWER on IntegriCloud