Пример #1
0
unset($carp_query);
unset($interface_ip_arr_cache);
$status = get_carp_status();
if ($_POST['disablecarp'] != "") {
    if ($status == true) {
        $carp_counter = find_number_of_created_carp_interfaces();
        mwexec("/sbin/sysctl net.inet.carp.allow=0");
        for ($x = 0; $x < $carp_counter; $x++) {
            mwexec("/sbin/ifconfig carp{$x} down");
            mwexec("/sbin/ifconfig carp{$x} delete");
        }
        $savemsg = "{$carp_counter} IPler pasifleştirildi.";
    } else {
        $savemsg = "CARP etkinleştirildi.";
        mwexec("/sbin/sysctl net.inet.carp.allow=1");
        interfaces_carp_configure();
        interfaces_carp_bring_up_final();
    }
}
$status = get_carp_status();
$pgtitle = "CARP: Durum";
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<p class="pgtitle"><?php 
echo $pgtitle;
?>
Пример #2
0
function interfaces_carp_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        return $xmlrpc_g['return']['authfail'];
    }
    interfaces_carp_configure();
    interfaces_carp_bring_up_final();
    return $xmlrpc_g['return']['true'];
}