summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg/carp.xml
blob: 36f9fbe18847f6eb6d37da24013e92d9a7b466fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
	<name>carp</name>
	<version>0.1.0</version>
	<xmlver>$Revision$</xmlver>
	<title>Services: CARP (failover)</title>
	<!-- Menu is where this packages menu will appear -->
	<menu>
	    <name>CARP (failover)</name>
	    <tooltiptext>CARP is a tool to help achieve system redundancy, by having multiple computers creating a single, virtual network interface between them.</tooltiptext>
	    <section>Services</section>
	    <url>carp_status.php</url>
	</menu>
	<tabs>
	    <!--<tab>
		<text>CARP Virtual IPs</text>
		<url>/pkg_edit.php?xml=carp.xml</url>
		<active/>
	    </tab>-->
	    <tab>
		<text>CARP Status</text>
		<url>carp_status.php</url>
	    </tab>
	    <tab>
		<text>CARP Settings</text>
		<url>pkg_edit.php?xml=carp_settings.xml&amp;id=0</url>
	    </tab>
	</tabs>
    	<additional_files_needed>
	    <prefix>/usr/local/pkg/</prefix>
	    <chmod>a+rx</chmod>
	    <item>http://www.pfsense.com/packages/config/carp_settings.xml</item>
	</additional_files_needed>
    	<additional_files_needed>
	    <prefix>/usr/local/pkg/pf/</prefix>
	    <chmod>a+rx</chmod>
	    <item>http://www.pfsense.com/packages/config/carp_sync_client.php</item>
	</additional_files_needed>
    	<additional_files_needed>
	    <prefix>/usr/local/pkg/</prefix>
	    <chmod>a+rx</chmod>
	    <nosync/>
	    <item>http://www.pfsense.com/packages/config/carp_sync_server.php</item>
	</additional_files_needed>
    	<additional_files_needed>
	    <prefix>/usr/local/www/</prefix>
	    <chmod>a+rx</chmod>
	    <item>http://www.pfsense.com/packages/config/carp_status.php</item>
	</additional_files_needed>
	<!-- configpath gets expanded out automatically and config items will be
         stored in that location -->
	<configpath>['installedpackages']['carp']['config']</configpath>
	<adddeleteeditpagefields>
	    <columnitem>
		    <fielddescr>VHID Group</fielddescr>
		    <fieldname>vhid</fieldname>
	    </columnitem>
	    <columnitem>
		    <fielddescr>Virtual IP Address</fielddescr>
		    <fieldname>ipaddress</fieldname>
	    </columnitem>
	    <columnitem>
		    <fielddescr>Advertising Frequency</fielddescr>
		    <fieldname>advskew</fieldname>
	    </columnitem>
	    <columnitem>
		    <fielddescr>Netmask</fielddescr>
		    <fieldname>netmask</fieldname>
	    </columnitem>
	</adddeleteeditpagefields>
	<!-- 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>Virtual IP Address</fielddescr>
			<fieldname>ipaddress</fieldname>
			<description>Enter the IP Address that you would like to share on both machines</description>
			<type>input</type>
		</field>
<!--
		<field>
			<fielddescr>Bind Virtual IP to interface</fielddescr>
			<fieldname>interface</fieldname>
			<description>Select the interface that this IP should bind to (carpdev).  Leave this set to AUTO for the system to automatically determine where to setup the IP.</description>
			<add_to_interfaces_selection>AUTO</add_to_interfaces_selection>
			<size>3</size>
			<value>AUTO</value>
			<type>interfaces_selection</type>			
		</field>
-->
		<field>
			<fielddescr>Virtual IP Netmask</fielddescr>
			<fieldname>netmask</fieldname>
			<description>Enter the IP Address's netmask that you would like to share on both machines</description>
			<type>select</type>
			<value>24</value>
			<options>
			    <option><value>1</value><name>1</name></option>
			    <option><value>2</value><name>2</name></option>
			    <option><value>3</value><name>3</name></option>
			    <option><value>4</value><name>4</name></option>
			    <option><value>5</value><name>5</name></option>
			    <option><value>6</value><name>6</name></option>
			    <option><value>7</value><name>7</name></option>
			    <option><value>8</value><name>8</name></option>
			    <option><value>9</value><name>9</name></option>
			    <option><value>10</value><name>10</name></option>
			    <option><value>11</value><name>11</name></option>
			    <option><value>12</value><name>12</name></option>
			    <option><value>13</value><name>13</name></option>
			    <option><value>14</value><name>14</name></option>
			    <option><value>15</value><name>15</name></option>
			    <option><value>16</value><name>16</name></option>
			    <option><value>17</value><name>17</name></option>
			    <option><value>18</value><name>18</name></option>
			    <option><value>19</value><name>19</name></option>
			    <option><value>20</value><name>20</name></option>
			    <option><value>21</value><name>21</name></option>
			    <option><value>22</value><name>22</name></option>
			    <option><value>23</value><name>23</name></option>
			    <option><value>24</value><name>24</name></option>
			    <option><value>25</value><name>25</name></option>
			    <option><value>26</value><name>26</name></option>
			    <option><value>27</value><name>27</name></option>
			    <option><value>28</value><name>28</name></option>
			    <option><value>29</value><name>29</name></option>
			    <option><value>30</value><name>30</name></option>
			    <option><value>31</value><name>31</name></option>
			    <option><value>32</value><name>32</name></option>
			</options>
		</field>
		<field>
			<fielddescr>Virtual IP Password</fielddescr>
			<fieldname>password</fieldname>
			<description>Enter the VHID group password.</description>
			<type>password</type>
		</field>
		<field>
			<fielddescr>VHID Group</fielddescr>
			<fieldname>vhid</fieldname>
			<description>Enter the VHID group that the machines will share</description>
			<type>select</type>
			<value>1</value>
			<options>
			    <option><value>1</value><name>1 (DEFAULT)</name></option>
			    <option><value>2</value><name>2</name></option>
			    <option><value>3</value><name>3</name></option>
			    <option><value>4</value><name>4</name></option>
			    <option><value>5</value><name>5</name></option>
			    <option><value>6</value><name>6</name></option>
			    <option><value>7</value><name>7</name></option>
			    <option><value>8</value><name>8</name></option>
			    <option><value>9</value><name>9</name></option>
			    <option><value>10</value><name>10</name></option>
			    <option><value>11</value><name>11</name></option>
			    <option><value>12</value><name>12</name></option>
			    <option><value>13</value><name>13</name></option>
			    <option><value>14</value><name>14</name></option>
			    <option><value>15</value><name>15</name></option>
			    <option><value>16</value><name>16</name></option>
			    <option><value>17</value><name>17</name></option>
			    <option><value>18</value><name>18</name></option>
			    <option><value>19</value><name>19</name></option>
			    <option><value>20</value><name>20</name></option>
			    <option><value>21</value><name>21</name></option>
			    <option><value>22</value><name>22</name></option>
			    <option><value>23</value><name>23</name></option>
			    <option><value>24</value><name>24</name></option>
			    <option><value>25</value><name>25</name></option>
			    <option><value>26</value><name>26</name></option>
			    <option><value>27</value><name>27</name></option>
			    <option><value>28</value><name>28</name></option>
			    <option><value>29</value><name>29</name></option>
			    <option><value>30</value><name>30</name></option>
			</options>
		</field>
		<field>
			<fielddescr>Advertising Frequency</fielddescr>
			<fieldname>advskew</fieldname>
			<description>The frequency that this machine will advertise.  0 = master.   Anything above 0 designates a backup.</description>
			<type>select</type>
			<value>0</value>
			<options>
			    <option><value>0</value><name>0 (DEFAULT)</name></option>
			    <option><value>1</value><name>1</name></option>
			    <option><value>2</value><name>2</name></option>
			    <option><value>3</value><name>3</name></option>
			    <option><value>4</value><name>4</name></option>
			    <option><value>5</value><name>5</name></option>
			    <option><value>6</value><name>6</name></option>
			    <option><value>7</value><name>7</name></option>
			    <option><value>8</value><name>8</name></option>
			    <option><value>9</value><name>9</name></option>
			    <option><value>10</value><name>10</name></option>
			    <option><value>11</value><name>11</name></option>
			    <option><value>12</value><name>12</name></option>
			    <option><value>13</value><name>13</name></option>
			    <option><value>14</value><name>14</name></option>
			    <option><value>15</value><name>15</name></option>
			    <option><value>16</value><name>16</name></option>
			    <option><value>17</value><name>17</name></option>
			    <option><value>18</value><name>18</name></option>
			    <option><value>19</value><name>19</name></option>
			    <option><value>20</value><name>20</name></option>
			    <option><value>21</value><name>21</name></option>
			    <option><value>22</value><name>22</name></option>
			    <option><value>23</value><name>23</name></option>
			    <option><value>24</value><name>24</name></option>
			    <option><value>25</value><name>25</name></option>
			    <option><value>26</value><name>26</name></option>
			    <option><value>27</value><name>27</name></option>
			    <option><value>28</value><name>28</name></option>
			    <option><value>29</value><name>29</name></option>
			    <option><value>30</value><name>30</name></option>
			</options>
		</field>
	</fields>
	<custom_php_command_before_form>
	</custom_php_command_before_form>
	<custom_add_php_command_late>
		interfaces_carp_setup();
	</custom_add_php_command_late>	
	<custom_php_resync_config_command>
	</custom_php_resync_config_command>
	<custom_delete_php_command>
		interfaces_carp_setup();
	</custom_delete_php_command>
	<custom_php_deinstall_command>
	    unlink_if_exists("/usr/local/pkg/carp*");
	    unlink_if_exists("/usr/local/pkg/pf/carp*");
	    unlink_if_exists("/usr/local/etc/rc.d/carp*");
	    unlink_if_exists("/usr/local/pkg/pf/carp*");
	</custom_php_deinstall_command>
</packagegui>
OpenPOWER on IntegriCloud