diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-04-28 00:00:28 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-04-28 00:00:28 +0000 |
commit | b1174d023e5e8e4ee5dd18f9f263761d5fe66dcf (patch) | |
tree | 6a733fcde4a924965864b688fade01a4c573a82b /etc | |
parent | cd88352b6f7bd8144aab088ebc90f65aa081eb9e (diff) | |
download | pfsense-b1174d023e5e8e4ee5dd18f9f263761d5fe66dcf.zip pfsense-b1174d023e5e8e4ee5dd18f9f263761d5fe66dcf.tar.gz |
* move get_carp_status() to common utilities area
* general cleanups
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d2becc6..b900ac3 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -93,6 +93,19 @@ function return_filename_as_array($filename) { } /* + * function get_carp_status(): returns the status of carp being enabled or disabled. + */ +function get_carp_status() { + /* grab the current status of carp */ + $status = `/sbin/sysctl net.inet.carp.allow`; + $status = str_replace("\n","",$status); + $status = str_replace(" ","",$status); + $status = split(":", $status); + if($status == "0") return false; + return true; +} + +/* * return_dir_as_array($filename): returns $filename contents as a string */ function return_filename_as_string($filename) { |