diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-11-28 19:55:35 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-11-28 19:55:35 -0500 |
commit | 84cf0b3ebfd88b561649d333811da52e92039498 (patch) | |
tree | b904f814f0921634c715ee499c0e5827cd5c34df /etc/ecl.php | |
parent | 690d24af8cd54ac4555087ed0392d53ea27e43ee (diff) | |
download | pfsense-84cf0b3ebfd88b561649d333811da52e92039498.zip pfsense-84cf0b3ebfd88b561649d333811da52e92039498.tar.gz |
Use exec()
Diffstat (limited to 'etc/ecl.php')
-rwxr-xr-x | etc/ecl.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/ecl.php b/etc/ecl.php index d879266..9f68919 100755 --- a/etc/ecl.php +++ b/etc/ecl.php @@ -38,14 +38,14 @@ $debug = false; function get_boot_disk() { global $g, $debug; - $disk = `/sbin/mount | /usr/bin/grep "on / " | /usr/bin/cut -d'/' -f3 | /usr/bin/cut -d' ' -f1`; + $disk = exec("/sbin/mount | /usr/bin/grep \"on / \" | /usr/bin/cut -d'/' -f3 | /usr/bin/cut -d' ' -f1"); return $disk; } function get_disk_slices($disk) { global $g, $debug; $slices_array = array(); - $slices = trim(`/bin/ls /dev/{$disk}s* 2>/dev/null`); + $slices = trim(exec("/bin/ls /dev/{$disk}s* 2>/dev/null")); $slices = str_replace("/dev/", "", $slices); if($slices == "ls: No match.") return; @@ -56,7 +56,7 @@ function get_disk_slices($disk) { function get_disks() { global $g, $debug; $disks_array = array(); - $disks = `/sbin/sysctl kern.disks | cut -d':' -f2`; + $disks = exec("/sbin/sysctl kern.disks | cut -d':' -f2"); $disks_s = explode(" ", $disks); foreach($disks_s as $disk) if(trim($disk)) |