1 /*
2 
3                           Firewall Builder
4 
5                  Copyright (C) 2007 NetCitadel, LLC
6 
7   Author:  Vadim Kurland     vadim@vk.crocodile.org
8 
9   $Id$
10 
11   This program is free software which we release under the GNU General Public
12   License. You may redistribute and/or modify this program under the terms
13   of that license as published by the Free Software Foundation; either
14   version 2 of the License, or (at your option) any later version.
15 
16   This program is distributed in the hope that it will be useful,
17   but WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   GNU General Public License for more details.
20 
21   To get a copy of the GNU General Public License, write to the Free Software
22   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 
24 */
25 
26 
27 #include "OSConfigurator_procurve.h"
28 #include "Helper.h"
29 #include "fwbuilder/Resources.h"
30 
31 #include "fwbuilder/Firewall.h"
32 #include "fwbuilder/FWOptions.h"
33 #include "fwbuilder/Interface.h"
34 #include "fwbuilder/Management.h"
35 #include "fwbuilder/Resources.h"
36 
37 #include <list>
38 #include <algorithm>
39 #include <functional>
40 #include <assert.h>
41 #include <iostream>
42 
43 using namespace libfwbuilder;
44 using namespace fwcompiler;
45 using namespace std;
46 
myPlatformName()47 string OSConfigurator_procurve::myPlatformName() { return "procurve"; }
48 
prolog()49 int OSConfigurator_procurve::prolog()
50 {
51     string host_os = fw->getStr("host_OS");
52 
53     if (host_os!="procurve")
54 	abort("Unsupported OS " + host_os );
55 
56     return Compiler::prolog();
57 }
58 
59 
processFirewallOptions()60 void OSConfigurator_procurve::processFirewallOptions()
61 {
62     if ( fw->getOptionsObject()->getBool("procurve_set_host_name") )
63     {
64         output << "hostname " << fw->getName() << endl;
65         output << endl;
66     }
67 }
68 
69