summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-21 01:03:45 +0000
committerColin Smith <colin@pfsense.org>2005-06-21 01:03:45 +0000
commit12eb705667a7feafdfd785008890533b2d15e327 (patch)
tree99ec10a08ece44e5c6c3a92b3a263fccb28f2d55 /etc
parentbb4f8f8ac3924cd75fbd4968b4db23d78e4dc81d (diff)
downloadpfsense-12eb705667a7feafdfd785008890533b2d15e327.zip
pfsense-12eb705667a7feafdfd785008890533b2d15e327.tar.gz
* Add get_disk_info().
* Remove fetch_latest_pkg_config(). * Merge before doing so ;)
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc24
1 files changed, 4 insertions, 20 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index f0a3834..2fc2d7f 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -865,26 +865,10 @@ function check_firmware_version($tocheck = "all", $return_php = true) {
return $raw_versions;
}
-/*
- * fetch_latest_pkg_config: download the latest pkg_config.xml to /tmp/ directory
- */
-function fetch_latest_pkg_config() {
- global $g;
- global $config;
- if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) {
- $pkg_config_location = $g['pkg_config_location'];
- $pkg_config_base_url = $g['pkg_config_base_url'];
- if(isset($config['system']['alt_pkgconfig_url']['enabled'])) {
- $pkg_config_location = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] . $config['system']['alt_pkgconfig_url']['pkgconfig_filename'];
- $pkg_config_base_url = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'];
- }
- mwexec("/usr/bin/fetch -o {$g['tmp_path']}/pkg_config.xml {$pkg_config_location}");
- if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) {
- print_info_box_np("Could not download pkg_config.xml from " . $pkg_config_base_url . ". Check your DNS settings.");
- die;
- }
- }
- return;
+function get_disk_info() {
+ exec("df -h | grep -w '/' | awk '{ print $2, $3, $4, $5 }'", $diskout);
+ return explode(' ', $diskout[0]);
+ // $size, $used, $avail, $cap
}
?>
OpenPOWER on IntegriCloud