Commit f21a4756 authored by Franco Fichtner's avatar Franco Fichtner

src: rejoice for varrun_path is gone

parent ab7cec05
......@@ -37,7 +37,6 @@ $g = array(
"factory_shipped_password" => "opnsense",
"dhcpd_chroot_path" => "/var/dhcpd",
"unbound_chroot_path" => "/var/unbound",
"varrun_path" => "/var/run",
"varetc_path" => "/var/etc",
"vardb_path" => "/var/db",
"admin_group" => "admins",
......
......@@ -32,7 +32,7 @@ require_once("globals.inc");
require_once("gmirror.inc");
global $g;
$status_file = "{$g['varrun_path']}/gmirror.status";
$status_file = '/var/run/gmirror.status';
$mirror_status = gmirror_get_status();
$mirror_list = array_keys($mirror_status);
......
......@@ -301,7 +301,7 @@ if ($_POST) {
if (!$input_errors || $_POST['apply'] == 'Apply changes') {
/* Stop DHCPv6 so we can cleanup leases */
killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid");
killbypid("{$g['dhcpd_chroot_path']}/var/run/dhcpdv6.pid");
// dhcp_clean_leases();
/* dnsmasq_configure calls dhcpd_configure */
/* no need to restart dhcpd twice */
......
<?php
/*
status_filter_reload.php
Copyright (C) 2006 Scott Ullrich
All rights reserved.
......@@ -33,8 +33,9 @@ require_once("functions.inc");
$pgtitle = array(gettext("Status"),gettext("Filter Reload Status"));
$shortcut_section = "firewall";
if(file_exists("{$g['varrun_path']}/filter_reload_status"))
$status = file_get_contents("{$g['varrun_path']}/filter_reload_status");
if (file_exists('/var/run/filter_reload_status')) {
$status = file_get_contents('/var/run/filter_reload_status');
}
if($_GET['getstatus']) {
echo "|{$status}|";
......
......@@ -45,13 +45,15 @@ class QueueStats {
public $suspends;
public $drops;
}
if (!file_exists("{$g['varrun_path']}/qstats.pid") || !isvalidpid("{$g['varrun_path']}/qstats.pid")) {
if (!isvalidpid('/var/run/qstats.pid')) {
/* Start in the background so we don't hang up the GUI */
mwexec_bg("/usr/local/sbin/qstats -p {$g['varrun_path']}/qstats.pid");
mwexec_bg('/usr/local/sbin/qstats -p /var/run/qstats.pid');
/* Give it a moment to start up */
sleep(1);
}
$fd = @fsockopen("unix://{$g['varrun_path']}/qstats");
$fd = @fsockopen('unix:///var/run/qstats');
if (!$fd) {
$error = "Something wrong happened during comunication with stat gathering";
} else {
......
......@@ -203,9 +203,9 @@ if ($_POST) {
write_config();
// Kill filterdns when value changes, filter_configure() will restart it
if (($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval']) &&
isvalidpid("{$g['varrun_path']}/filterdns.pid"))
killbypid("{$g['varrun_path']}/filterdns.pid");
if ($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval']) {
killbypid('/var/run/filterdns.pid');
}
$retval = 0;
$retval = filter_configure();
......
......@@ -31,8 +31,13 @@ require_once("guiconfig.inc");
require_once("filter.inc");
require_once("vpn.inc");
if (!is_array($config['pppoes']['pppoe']))
if (!is_array($config['pppoes'])) {
$config['pppoes'] = array();
}
if (!is_array($config['pppoes']['pppoe'])) {
$config['pppoes']['pppoe'] = array();
}
$a_pppoes = &$config['pppoes']['pppoe'];
......@@ -65,8 +70,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_pppoes[$_GET['id']]) {
if ("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid")
killbypid("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid");
killbypid("/var/run/pppoe{$a_pppoes[$_GET['id']]['pppoeid']}-vpn.pid");
if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']))
mwexec("/bin/rm -r {$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']);
unset($a_pppoes[$_GET['id']]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment