aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-23 00:45:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-23 00:45:53 +0000
commitf124332e9344165d9f1618ffb8e732e835710d65 (patch)
tree2856ad6563801c3386addb06aa2aa7176f22e7f8 /packages
parentf363f458e010a533d64ede6eb87c011c984a2a7c (diff)
downloadpfsense-packages-f124332e9344165d9f1618ffb8e732e835710d65.tar.gz
pfsense-packages-f124332e9344165d9f1618ffb8e732e835710d65.tar.bz2
pfsense-packages-f124332e9344165d9f1618ffb8e732e835710d65.zip
Minor style cleanups
Diffstat (limited to 'packages')
-rw-r--r--packages/ifstated.xml166
1 files changed, 83 insertions, 83 deletions
diff --git a/packages/ifstated.xml b/packages/ifstated.xml
index 7ec83eec..1e57ce81 100644
--- a/packages/ifstated.xml
+++ b/packages/ifstated.xml
@@ -1,87 +1,87 @@
<packagegui>
+ <name>ifstated</name>
+ <version>20041117</version>
+ <title>ifstated: Settings</title>
+ <menu>
<name>ifstated</name>
- <version>20041117</version>
- <title>ifstated: Settings</title>
- <menu>
- <name>ifstated</name>
- <tooltiptext>Modify ifstated settings.</tooltiptext>
- <section>Services</section>
- <configfile>ifstated.xml</configfile>
- <url>/pkg_edit.php?xml=ifstated.xml&amp;id=0</url>
- </menu>
- <aftersaveredirect>pkg_edit.php?xml=ifstated.xml&amp;id=0</aftersaveredirect>
- <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
- <modify_system>
- <item>
- <modifyfilename>/etc/sysctl.conf</modifyfilename>
- <textneeded>net.inet.carp.preempt=1</textneeded>
- </item>
- </modify_system>
- <fields>
- <field>
- <fielddescr>External Test IP</fielddescr>
- <fieldname>exttestip</fieldname>
- <description>Enter an IP to test external connectivity with. This should be a host with extremely high availability.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Internal Test IP</fielddescr>
- <fieldname>inttestip</fieldname>
- <description>Enter an IP to test internal connectivity with. This should be a host with extremely high availability.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Paired Firewall External IP</fielddescr>
- <fieldname>pairextip</fieldname>
- <description>Enter the real IP of the other firewall's (real) external interface.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Paired Firewall Internal IP</fielddescr>
- <fieldname>pairintip</fieldname>
- <description>Enter the real IP of the other firewall's (real) internal interface.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Initial State</fielddescr>
- <fieldname>initstate</fieldname>
- <description>Enter the desired initial state for this firewall.</description>
- <type>select</type>
- <options>
- <option>
- <name>Primary</name>
- <value>primary</value>
- </option>
- <option>
- <name>Backup</name>
- <value>backup</value>
- </option>
- </options>
- </field>
- </fields>
- <custom_php_install_command>
- global $config;
- mwexec("rm /usr/local/etc/rc.d/ifstated*");
- $fout = fopen("/usr/local/etc/rc.d/ifstated.sh","w");
- fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/ifstated\n");
- fclose($fout);
- mwexec("chmod a+x /usr/local/etc/rc.d/radiusd.sh");
- </custom_php_install_command>
- <custom_add_php_command>
- global $config;
- $fout = fopen("/usr/local/etc/ifstated.conf","w");
- if($config['installedpackages']['ifstated']['config'] != "") {
- fwrite($fout, "init-state " . $_POST['initstate'] . "\n\n");
- fwrite($fout, "carp_up = \"((carp0 link up) and (carp1 link up))\"\ncarp_down = \"((! carp0 link up) and (! carp1 link up))\"\ncarp_sync= \"((carp0 link up and carp1 link up) or ((!carp0 link up) and (!carp1 link up)))\"\n\n");
- fwrite($fout, "net = '( \"ping -q -c 1 -t 1 " . $_POST['exttestip'] . " > /dev/null\" every 10 and \"ping -q -c 1 -t 1 " . $_POST['inttestip'] . " > /dev/null\" every 10)'\n\n");
- fwrite($fout, "peer = '( \"ping -q -c 1 -t 1 " . $_POST['pairextip'] . " > /dev/null\" every 10 and \"ping -q -c 1 -t 1 " . $_POST['pairintip'] . " > /dev/null\" every 10)'\n\n");
- fwrite($fout, "state auto {\nif \$carp_up {\nset-state primary\n}\nif \$carp_down {\nset-state backup\n}\n}\n\n");
- fwrite($fout, "state primary {\ninit {\nrun \"ifconfig carp0 advskew 10\"\nrun \"ifconfig carp1 advskew 10\"\n}\nif ! \$net {\nset-state demoted\n}\n}\n\nstate demoted {\ninit {\nrun \"ifconfig carp0 advskew 254\"\nrun \"ifconfig carp1 advskew 254\"\n}\nif \$net {\nset-state primary\n}\n}\n\n");
- fwrite($fout, "state promoted {\ninit {\nrun \"ifconfig carp0 advskew 0\"\nrun \"ifconfig carp1 advskew 0\"\n}\nif \$peer or ! \$net {\nset-state backup\n}\n}\n\n");
- fwrite($fout, "state backup {\ninit {\nrun \"ifconfig carp0 advskew 100\"\nrun \"ifconfig carp1 advskew 100\"\n}\nif ! \$carp_sync and \$net and \"sleep 5\" every 10 {\nif (! \$carp_sync) and \$net {\nset-state promoted\n}\n}\n}\n");
- }
- fclose($fout);
- mwexec("/usr/bin/killall -HUP ifstated");
- </custom_add_php_command>
+ <tooltiptext>Modify ifstated settings.</tooltiptext>
+ <section>Services</section>
+ <configfile>ifstated.xml</configfile>
+ <url>/pkg_edit.php?xml=ifstated.xml&amp;id=0</url>
+ </menu>
+ <aftersaveredirect>pkg_edit.php?xml=ifstated.xml&amp;id=0</aftersaveredirect>
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+ <modify_system>
+ <item>
+ <modifyfilename>/etc/sysctl.conf</modifyfilename>
+ <textneeded>net.inet.carp.preempt=1</textneeded>
+ </item>
+ </modify_system>
+ <fields>
+ <field>
+ <fielddescr>External Test IP</fielddescr>
+ <fieldname>exttestip</fieldname>
+ <description>Enter an IP to test external connectivity with. This should be a host with extremely high availability.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Internal Test IP</fielddescr>
+ <fieldname>inttestip</fieldname>
+ <description>Enter an IP to test internal connectivity with. This should be a host with extremely high availability.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Paired Firewall External IP</fielddescr>
+ <fieldname>pairextip</fieldname>
+ <description>Enter the real IP of the other firewall's (real) external interface.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Paired Firewall Internal IP</fielddescr>
+ <fieldname>pairintip</fieldname>
+ <description>Enter the real IP of the other firewall's (real) internal interface.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>Initial State</fielddescr>
+ <fieldname>initstate</fieldname>
+ <description>Enter the desired initial state for this firewall.</description>
+ <type>select</type>
+ <options>
+ <option>
+ <name>Primary</name>
+ <value>primary</value>
+ </option>
+ <option>
+ <name>Backup</name>
+ <value>backup</value>
+ </option>
+ </options>
+ </field>
+ </fields>
+ <custom_php_install_command>
+ global $config;
+ mwexec("rm /usr/local/etc/rc.d/ifstated*");
+ $fout = fopen("/usr/local/etc/rc.d/ifstated.sh","w");
+ fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/ifstated\n");
+ fclose($fout);
+ mwexec("chmod a+x /usr/local/etc/rc.d/radiusd.sh");
+ </custom_php_install_command>
+ <custom_add_php_command>
+ global $config;
+ $fout = fopen("/usr/local/etc/ifstated.conf","w");
+ if($config['installedpackages']['ifstated']['config'] != "") {
+ fwrite($fout, "init-state " . $_POST['initstate'] . "\n\n");
+ fwrite($fout, "carp_up = \"((carp0 link up) and (carp1 link up))\"\ncarp_down = \"((! carp0 link up) and (! carp1 link up))\"\ncarp_sync= \"((carp0 link up and carp1 link up) or ((!carp0 link up) and (!carp1 link up)))\"\n\n");
+ fwrite($fout, "net = '( \"ping -q -c 1 -t 1 " . $_POST['exttestip'] . " > /dev/null\" every 10 and \"ping -q -c 1 -t 1 " . $_POST['inttestip'] . " > /dev/null\" every 10)'\n\n");
+ fwrite($fout, "peer = '( \"ping -q -c 1 -t 1 " . $_POST['pairextip'] . " > /dev/null\" every 10 and \"ping -q -c 1 -t 1 " . $_POST['pairintip'] . " > /dev/null\" every 10)'\n\n");
+ fwrite($fout, "state auto {\nif \$carp_up {\nset-state primary\n}\nif \$carp_down {\nset-state backup\n}\n}\n\n");
+ fwrite($fout, "state primary {\ninit {\nrun \"ifconfig carp0 advskew 10\"\nrun \"ifconfig carp1 advskew 10\"\n}\nif ! \$net {\nset-state demoted\n}\n}\n\nstate demoted {\ninit {\nrun \"ifconfig carp0 advskew 254\"\nrun \"ifconfig carp1 advskew 254\"\n}\nif \$net {\nset-state primary\n}\n}\n\n");
+ fwrite($fout, "state promoted {\ninit {\nrun \"ifconfig carp0 advskew 0\"\nrun \"ifconfig carp1 advskew 0\"\n}\nif \$peer or ! \$net {\nset-state backup\n}\n}\n\n");
+ fwrite($fout, "state backup {\ninit {\nrun \"ifconfig carp0 advskew 100\"\nrun \"ifconfig carp1 advskew 100\"\n}\nif ! \$carp_sync and \$net and \"sleep 5\" every 10 {\nif (! \$carp_sync) and \$net {\nset-state promoted\n}\n}\n}\n");
+ }
+ fclose($fout);
+ mwexec("/usr/bin/killall -HUP ifstated");
+ </custom_add_php_command>
</packagegui>