summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-04-28 00:00:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-04-28 00:00:28 +0000
commitb1174d023e5e8e4ee5dd18f9f263761d5fe66dcf (patch)
tree6a733fcde4a924965864b688fade01a4c573a82b /etc
parentcd88352b6f7bd8144aab088ebc90f65aa081eb9e (diff)
downloadpfsense-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.inc13
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) {
OpenPOWER on IntegriCloud