Merge pull request #115 from fabianfrz/quagga

Quagga
This commit is contained in:
Fabian Franz 2017-04-10 14:27:12 +02:00 committed by GitHub
commit 5b0d396f56
8 changed files with 12 additions and 29 deletions

View file

@ -1,8 +1,7 @@
PLUGIN_NAME= quagga
PLUGIN_VERSION= 0.0.3
PLUGIN_VERSION= 1.0.0
PLUGIN_COMMENT= Quagga Routing Suite
PLUGIN_DEPENDS= quagga
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
PLUGIN_DEVEL= yes
.include "../../Mk/plugins.mk"

View file

@ -119,7 +119,6 @@ class ServiceController extends ApiControllerBase
public function reconfigureAction()
{
if ($this->request->isPost()) {
$force_restart = false;
// close session for long running action
$this->sessionClose();
@ -128,22 +127,15 @@ class ServiceController extends ApiControllerBase
$runStatus = $this->statusAction();
// stop squid when disabled
if ($runStatus['status'] == "running" &&
($mdlGeneral->enabled->__toString() == 0)) {
$this->stopAction();
}
// stop quagga if it is running or not
$this->stopAction();
// generate template
$backend->configdRun('template reload OPNsense/Quagga');
// (res)start daemon
if ($mdlGeneral->enabled->__toString() == 1) {
if ($runStatus['status'] == "running" && !$force_restart) {
$this->restartAction();
} else {
$this->startAction();
}
$this->startAction();
}
return array("status" => "ok");

View file

@ -21,11 +21,6 @@
<label>Authentication Key</label>
<type>text</type>
</field>
<field>
<id>interface.area</id>
<label>Area</label>
<type>text</type>
</field>
<field>
<id>interface.cost</id>
<label>Cost</label>

View file

@ -3,7 +3,7 @@
<id>ospf.enabled</id>
<label>Enable</label>
<type>checkbox</type>
<help>This will activate the ospf service if routing protocols are enabled in "General".</help>
<help>This will activate the OSPF service if routing protocols are enabled in "General".</help>
</field>
<field>
<id>ospf.passiveinterfaces</id>

View file

@ -14,7 +14,6 @@
<default>0</default>
<Required>Y</Required>
</originatealways>
<passiveinterfaces type="InterfaceField">
<Required>N</Required>
<multiple>Y</multiple>
@ -90,11 +89,6 @@
<Required>N</Required>
<mask>/^\S+$/</mask>
</authkey>
<area type="CSVListField">
<default></default>
<Required>N</Required>
<mask>/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3},)*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/</mask>
</area>
<cost type="IntegerField">
<default></default>
<MinimumValue>0</MinimumValue>

View file

@ -119,7 +119,6 @@ $( document ).ready(function() {
<th data-column-id="interfacename" data-type="string" data-visible="true">{{ lang._('Interface Name') }}</th>
<th data-column-id="networktype" data-type="string" data-visible="true">{{ lang._('Network Type') }}</th>
<th data-column-id="authtype" data-type="string" data-visible="true">{{ lang._('Authentication Type') }}</th>
<th data-column-id="area" data-type="string" data-visible="true">{{ lang._('Area') }}</th>
<th data-column-id="uuid" data-type="string" data-identifier="true" data-visible="false">{{ lang._('ID') }}</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">{{ lang._('Commands') }}</th>
</tr>

View file

@ -10,3 +10,7 @@ chmod 750 /var/run/quagga
mkdir -p /usr/local/etc/quagga
chown $user:$group /usr/local/etc/quagga
chmod 750 /usr/local/etc/quagga
# ensure that quagga can read the configuration files
chown -R $user:$group /usr/local/etc/quagga
chown -R $user:$group /var/run/quagga

View file

@ -5,19 +5,19 @@ type:script
message:starting quagga
[stop]
command:/usr/local/etc/rc.d/quagga; exit 0
command:/usr/local/etc/rc.d/quagga stop; exit 0
parameters:
type:script
message:stopping quagga
[restart]
command:/usr/local/etc/rc.d/quagga restart
command:/usr/local/opnsense/scripts/quagga/setup.sh;/usr/local/etc/rc.d/quagga restart
parameters:
type:script
message:restarting quagga
[reconfigure]
command:/usr/local/etc/rc.d/quagga reload
command:/usr/local/opnsense/scripts/quagga/setup.sh;/usr/local/etc/rc.d/quagga reload
parameters:
type:script
message:reconfigure quagga