Exemplo n.º 1
0
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
	POSSIBILITY OF SUCH DAMAGE.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Network"), gettext("Static routes"));
if ($_POST) {
    $pconfig = $_POST;
    if ($_POST['apply']) {
        $retval = 0;
        if (!file_exists($d_sysrebootreqd_path)) {
            $retval |= updatenotify_process("routes", "routes_process_updatenotification");
            $retval |= rc_start_service("routing");
        }
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            updatenotify_delete("routes");
        }
    }
}
if (!is_array($config['staticroutes']['route'])) {
    $config['staticroutes']['route'] = array();
}
array_sort_key($config['staticroutes']['route'], "network");
$a_routes =& $config['staticroutes']['route'];
if ($_GET['act'] === "del") {
    updatenotify_set("routes", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    header("Location: system_routes.php");
Exemplo n.º 2
0
        $config['ad']['domainname_netbios'] = $_POST['domainname_netbios'];
        $config['ad']['username'] = $_POST['username'];
        $config['ad']['password'] = $_POST['password'];
        $config['ad']['enable'] = isset($_POST['enable']) ? true : false;
        if ($config['ad']['enable']) {
            $config['samba']['enable'] = true;
            $config['samba']['security'] = "ads";
            $config['samba']['workgroup'] = $_POST['domainname_netbios'];
        }
        write_config();
        $retval = 0;
        if (!file_exists($d_sysrebootreqd_path)) {
            config_lock();
            rc_exec_service("pam");
            rc_exec_service("ldap");
            rc_start_service("nsswitch");
            rc_update_service("samba");
            config_unlock();
        }
        $savemsg = get_std_save_message($retval);
    }
}
include "fbegin.inc";
?>
<script type="text/javascript">
<!--
function enable_change(enable_change) {
	var endis = !(document.iform.enable.checked || enable_change);
	document.iform.domaincontrollername.disabled = endis;
	document.iform.domainname_dns.disabled = endis;
	document.iform.domainname_netbios.disabled = endis;
Exemplo n.º 3
0
if (!is_link("/usr/local/www/ext/dnsmasq")) {
    symlink($config['dnsmasq']['rootfolder'] . "dnsmasq", "/usr/local/www/ext/dnsmasq");
} else {
}
// create links to webroot
if (!is_link("/usr/local/www/extensions_dnsmasq_clients.php")) {
    symlink("/usr/local/www/ext/dnsmasq/extensions_dnsmasq_clients.php", "/usr/local/www/extensions_dnsmasq_clients.php");
} else {
}
if (!is_link("/usr/local/www/extensions_dnsmasq_log.php")) {
    symlink("/usr/local/www/ext/dnsmasq/extensions_dnsmasq_log.php", "/usr/local/www/extensions_dnsmasq_log.php");
} else {
}
if (!is_link("/usr/local/www/extensions_dnsmasq_server.php")) {
    symlink("/usr/local/www/ext/dnsmasq/extensions_dnsmasq_server.php", "/usr/local/www/extensions_dnsmasq_server.php");
} else {
}
if (!is_link("/usr/local/www/extensions_dnsmasq_hosts.php")) {
    symlink("/usr/local/www/ext/dnsmasq/extensions_dnsmasq_hosts.php", "/usr/local/www/extensions_dnsmasq_hosts.php");
} else {
}
if (!is_link("/usr/local/www/extensions_dnsmasq_conf.php")) {
    symlink("/usr/local/www/ext/dnsmasq/extensions_dnsmasq_conf.php", "/usr/local/www/extensions_dnsmasq_conf.php");
} else {
}
if (isset($config['dnsmasq']['enable'])) {
    rc_update_rcconf("dnsmasq", "enable");
    rc_start_service("dnsmasq");
} else {
    rc_update_rcconf("dnsmasq", "disable");
}