summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-07 09:25:27 +0000
committerErmal <eri@pfsense.org>2012-06-07 09:25:27 +0000
commit76231e63981ca201ca73b138d17316f11c8d3448 (patch)
treecae36468edad05211407cf96153df5b0c5202469
parent3e662cb0b22c4c7277b30a134e85a6d535044f1e (diff)
downloadpfsense-76231e63981ca201ca73b138d17316f11c8d3448.zip
pfsense-76231e63981ca201ca73b138d17316f11c8d3448.tar.gz
Bye, bye olsrd back to packages.
-rw-r--r--etc/inc/services.inc289
-rwxr-xr-xetc/rc.bootup3
-rw-r--r--usr/local/pkg/olsrd.xml145
-rwxr-xr-xusr/local/www/fbegin.inc1
4 files changed, 1 insertions, 437 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 08430c1..f1edc3e 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -34,7 +34,7 @@
/*
pfSense_BUILDER_BINARIES: /usr/bin/killall /bin/pgrep /bin/sh /usr/local/sbin/dhcpd /usr/local/sbin/igmpproxy
pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/sbin/arp /sbin/ifconfig /usr/local/sbin/dnsmasq
- pfSense_BUILDER_BINARIES: /usr/sbin/bsnmpd /sbin/route /usr/local/sbin/olsrd
+ pfSense_BUILDER_BINARIES: /usr/sbin/bsnmpd /sbin/route
pfSense_BUILDER_BINARIES: /usr/local/sbin/miniupnpd /usr/sbin/radvd /usr/local/sbin/unbound
pfSense_BUILDER_BINARIES: /usr/local/sbin/dhcleases6
pfSense_MODULE: utils
@@ -1757,293 +1757,6 @@ EOD;
return 0;
}
-function setup_wireless_olsr() {
- global $config, $g;
- if ($g['platform'] == 'jail' || !$config['installedpackages']['olsrd'] || !$config['installedpackages'])
- return;
- if(isset($config['system']['developerspew'])) {
- $mt = microtime();
- echo "setup_wireless_olsr($interface) being called $mt\n";
- }
- conf_mount_rw();
- foreach($config['installedpackages']['olsrd']['config'] as $olsrd) {
- $olsr_enable = $olsrd['enable'];
- if($olsr_enable <> "on") {
- if (is_process_running("olsrd"))
- mwexec("/usr/bin/killall olsrd", true);
- return;
- }
- $fd = fopen("{$g['varetc_path']}/olsr.conf", "w");
-
- if($olsrd['announcedynamicroute'] or $olsrd['enableannounce'] == "on") {
- $enableannounce .= "\nHna4\n";
- $enableannounce .= "{\n";
- if($olsrd['announcedynamicroute'])
- $enableannounce .= "\t{$olsrd['announcedynamicroute']}\n";
- if($olsrd['enableannounce'] == "on")
- $enableannounce .= "0.0.0.0 0.0.0.0";
- $enableannounce .= "\n}\n";
- } else {
- $enableannounce = "";
- }
-
- $olsr .= <<<EODA
-#
-# olsr.org OLSR daemon config file
-#
-# Lines starting with a # are discarded
-#
-# This file was generated by setup_wireless_olsr() in services.inc
-#
-
-# This file is an example of a typical
-# configuration for a mostly static
-# network(regarding mobility) using
-# the LQ extention
-
-# Debug level(0-9)
-# If set to 0 the daemon runs in the background
-
-DebugLevel 2
-
-# IP version to use (4 or 6)
-
-IpVersion 4
-
-# Clear the screen each time the internal state changes
-
-ClearScreen yes
-
-{$enableannounce}
-
-# Should olsrd keep on running even if there are
-# no interfaces available? This is a good idea
-# for a PCMCIA/USB hotswap environment.
-# "yes" OR "no"
-
-AllowNoInt yes
-
-# TOS(type of service) value for
-# the IP header of control traffic.
-# If not set it will default to 16
-
-#TosValue 16
-
-# The fixed willingness to use(0-7)
-# If not set willingness will be calculated
-# dynamically based on battery/power status
-# if such information is available
-
-#Willingness 4
-
-# Allow processes like the GUI front-end
-# to connect to the daemon.
-
-IpcConnect
-{
- # Determines how many simultaneously
- # IPC connections that will be allowed
- # Setting this to 0 disables IPC
-
- MaxConnections 0
-
- # By default only 127.0.0.1 is allowed
- # to connect. Here allowed hosts can
- # be added
-
- Host 127.0.0.1
- #Host 10.0.0.5
-
- # You can also specify entire net-ranges
- # that are allowed to connect. Multiple
- # entries are allowed
-
- #Net 192.168.1.0 255.255.255.0
-}
-
-# Wether to use hysteresis or not
-# Hysteresis adds more robustness to the
-# link sensing but delays neighbor registration.
-# Used by default. 'yes' or 'no'
-
-UseHysteresis no
-
-# Hysteresis parameters
-# Do not alter these unless you know
-# what you are doing!
-# Set to auto by default. Allowed
-# values are floating point values
-# in the interval 0,1
-# THR_LOW must always be lower than
-# THR_HIGH.
-
-#HystScaling 0.50
-#HystThrHigh 0.80
-#HystThrLow 0.30
-
-
-# Link quality level
-# 0 = do not use link quality
-# 1 = use link quality for MPR selection
-# 2 = use link quality for MPR selection and routing
-# Defaults to 0
-
-LinkQualityLevel {$olsrd['enablelqe']}
-
-# Link quality window size
-# Defaults to 10
-
-LinkQualityWinSize 10
-
-# Polling rate in seconds(float).
-# Default value 0.05 sec
-
-Pollrate 0.05
-
-
-# TC redundancy
-# Specifies how much neighbor info should
-# be sent in TC messages
-# Possible values are:
-# 0 - only send MPR selectors
-# 1 - send MPR selectors and MPRs
-# 2 - send all neighbors
-#
-# defaults to 0
-
-TcRedundancy 2
-
-#
-# MPR coverage
-# Specifies how many MPRs a node should
-# try select to reach every 2 hop neighbor
-#
-# Can be set to any integer >0
-#
-# defaults to 1
-
-MprCoverage 3
-
-# Example plugin entry with parameters:
-
-EODA;
-
-if($olsrd['enablehttpinfo'] == "on") {
- $olsr .= <<<EODB
-
-LoadPlugin "/usr/local/lib/olsrd_httpinfo.so.0.1"
-{
- PlParam "port" "{$olsrd['port']}"
- PlParam "Net" "{$olsrd['allowedhttpinfohost']} {$olsrd['allowedhttpinfosubnet']}"
-}
-
-EODB;
-
-}
-
-if($olsrd['enabledsecure'] == "on") {
- $olsr .= <<<EODC
-
-LoadPlugin "/usr/local/lib/olsrd_secure.so.0.5"
-{
- PlParam "Keyfile" "/usr/local/etc/olsrkey.txt"
-}
-
-EODC;
-
-}
-
-if($olsrd['enabledyngw'] == "on") {
-
- /* unset default route, olsr auto negotiates */
- mwexec("/sbin/route delete default");
-
- $olsr .= <<<EODE
-
-LoadPlugin "/usr/local/lib/olsrd_dyn_gw.so.0.4"
-{
- # how often to look for a inet gw, in seconds
- # defaults to 5 secs, if commented out
- PlParam "Interval" "{$olsrd['polling']}"
-
- # if one or more IPv4 addresses are given, do a ping on these in
- # descending order to validate that there is not only an entry in
- # routing table, but also a real internet connection. If any of
- # these addresses could be pinged successfully, the test was
- # succesful, i.e. if the ping on the 1st address was successful,the
- # 2nd won't be pinged
- PlParam "Ping" "{$olsrd['ping']}"
- #PlParam "HNA" "192.168.81.0 255.255.255.0"
-}
-
-EODE;
-
-}
-
-foreach($config['installedpackages']['olsrd']['config'] as $conf) {
- $interfaces = explode(',', $conf['iface_array']);
- foreach($interfaces as $interface) {
- $realinterface = convert_friendly_interface_to_real_interface_name($interface);
-$olsr .= <<<EODAD
-Interface "{$realinterface}"
-{
-
- # Hello interval in seconds(float)
- HelloInterval 2.0
-
- # HELLO validity time
- HelloValidityTime 20.0
-
- # TC interval in seconds(float)
- TcInterval 5.0
-
- # TC validity time
- TcValidityTime 30.0
-
- # MID interval in seconds(float)
- MidInterval 5.0
-
- # MID validity time
- MidValidityTime 30.0
-
- # HNA interval in seconds(float)
- HnaInterval 5.0
-
- # HNA validity time
- HnaValidityTime 30.0
-
- # When multiple links exist between hosts
- # the weight of interface is used to determine
- # the link to use. Normally the weight is
- # automatically calculated by olsrd based
- # on the characteristics of the interface,
- # but here you can specify a fixed value.
- # Olsrd will choose links with the lowest value.
-
- # Weight 0
-
-
-}
-
-EODAD;
-
- }
- break;
-}
- fwrite($fd, $olsr);
- fclose($fd);
- }
-
- if (is_process_running("olsrd"))
- mwexec("/usr/bin/killall olsrd", true);
-
- sleep(2);
-
- mwexec_bg("/usr/local/sbin/olsrd -f {$g['varetc_path']}/olsr.conf");
-
- conf_mount_ro();
-}
-
/* configure cron service */
function configure_cron() {
global $g, $config;
diff --git a/etc/rc.bootup b/etc/rc.bootup
index 3b14cb1..8b78866 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -364,9 +364,6 @@ auto_login();
/* load graphing functions */
enable_rrd_graphing();
-/* startup OLSR if needed */
-setup_wireless_olsr();
-
/* startup routed if needed */
include_once("/usr/local/pkg/routed.inc");
setup_routed();
diff --git a/usr/local/pkg/olsrd.xml b/usr/local/pkg/olsrd.xml
deleted file mode 100644
index 85c3e6b..0000000
--- a/usr/local/pkg/olsrd.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<packagegui>
- <name>olsrd</name>
- <version>1.0</version>
- <title>OLSRD</title>
- <!-- Menu is where this packages menu will appear -->
- <menu>
- <name>OLSRD</name>
- <section>Services</section>
- <configfile>olsrd.xml</configfile>
- </menu>
- <service>
- <name>OLSRD</name>
- <rcfile>/usr/local/sbin/olsrd -f /var/etc/olsr.conf</rcfile>
- </service>
- <tabs>
- <tab>
- <text>OLSRD Settings</text>
- <url>/pkg_edit.php?xml=olsrd.xml&amp;id=0</url>
- <active/>
- </tab>
- </tabs>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>http://www.pfsense.com/packages/config/OLSRD_rules.php</item>
- </additional_files_needed>
- <!-- configpath gets expanded out automatically and config items will be
- stored in that location -->
- <configpath>['installedpackages']['OLSRD']['config']</configpath>
- <!-- fields gets invoked when the user adds or edits a item. the following items
- will be parsed and rendered for the user as a gui with input, and selectboxes. -->
- <fields>
- <field>
- <fielddescr>Enable OLSR</fielddescr>
- <fieldname>enable</fieldname>
- <description>Enables the dynamic mesh linking daemon</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Link Quality Level</fielddescr>
- <fieldname>enablelqe</fieldname>
- <type>select</type>
- <size>1</size>
- <options>
- <option><value>2</value><name>2</name></option>
- <option><value>0</value><name>0</name></option>
- <option><value>1</value><name>1</name></option>
- </options>
- </field>
- <field>
- <fielddescr>Interfaces</fielddescr>
- <fieldname>iface_array</fieldname>
- <value>lan</value>
- <multiple>true</multiple>
- <size>3</size>
- <type>interfaces_selection</type>
- <description>Select the interfaces that OLSR will bind to. You can use the CTRL or COMMAND key to select multiple interfaces.</description>
- </field>
- <field>
- <fielddescr>Enable HTTPInfo Plugin</fielddescr>
- <fieldname>enablehttpinfo</fieldname>
- <description>Enables the OLSR stats web server</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>HTTPInfo Port</fielddescr>
- <fieldname>port</fieldname>
- <description>Port that HTTPInfo will listen on</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Allowed host(s)</fielddescr>
- <fieldname>allowedhttpinfohost</fieldname>
- <description>Hosts that are allowed to access the HTTPInfo web service.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Allowed host(s) subnet</fielddescr>
- <fieldname>allowedhttpinfosubnet</fieldname>
- <description>Enter the subnet mask in form 255.255.255.0</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Enable Dynamic Gateway</fielddescr>
- <fieldname>enabledyngw</fieldname>
- <description>Enables the OLSR Dynamic Gateways feature</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Announce self as Dynamic Gateway</fielddescr>
- <fieldname>enableannounce</fieldname>
- <description>Enables the OLSR Dynamic Gateways Announcing feature</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Announce Dynamic local route</fielddescr>
- <fieldname>announcedynamicroute</fieldname>
- <description>Enter the IP/Netmask</description>
- <type>textarea</type>
- <rows>3</rows>
- <cols>50</cols>
- </field>
- <field>
- <fielddescr>Ping</fielddescr>
- <fieldname>ping</fieldname>
- <description>Pings this host to ensure connectivity</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Poll</fielddescr>
- <fieldname>polling</fieldname>
- <description>How often to look for a inet gw, in seconds.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Enable Secure Mode</fielddescr>
- <fieldname>enabledsecure</fieldname>
- <description>Enables the secure mode</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Key</fielddescr>
- <fieldname>securekey</fieldname>
- <description>Paste the secure key information here.</description>
- <type>textarea</type>
- <rows>5</rows>
- <cols>50</cols>
- </field>
- </fields>
- <custom_delete_php_command>
- </custom_delete_php_command>
- <custom_php_resync_config_command>
- conf_mount_rw();
- $fd = fopen("/usr/local/etc/olsrkey.txt","w");
- fwrite($fd, $_POST['securekey']);
- fclose($fd);
- setup_wireless_olsr($if);
- conf_mount_ro();
- </custom_php_resync_config_command>
- <custom_php_install_command>
- </custom_php_install_command>
- <custom_php_deinstall_command>
- </custom_php_deinstall_command>
-</packagegui>
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 369f269..7af515b 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -146,7 +146,6 @@ $services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
$services_menu[] = array(gettext("NTP"), "/services_ntpd.php");
-$services_menu[] = array(gettext("OLSR"), "/pkg_edit.php?xml=olsrd.xml&id=0");
$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php");
$services_menu[] = array(gettext("RIP"), "/pkg_edit.php?xml=routed.xml&id=0");
$services_menu[] = array(gettext("SNMP"), "/services_snmp.php");
OpenPOWER on IntegriCloud