mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 08:29:32 +02:00
added installation configlets for fwsm
This commit is contained in:
@@ -25,6 +25,7 @@ test/ipt/secuwall-1
|
|||||||
Makefile
|
Makefile
|
||||||
!test/*/Makefile
|
!test/*/Makefile
|
||||||
install*
|
install*
|
||||||
|
!src/res/configlets/*/install*
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
configure
|
configure
|
||||||
config.h
|
config.h
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
|
|||||||
# build number is like "nano" version number. I am incrementing build
|
# build number is like "nano" version number. I am incrementing build
|
||||||
# number during development cycle
|
# number during development cycle
|
||||||
#
|
#
|
||||||
BUILD_NUM="3521"
|
BUILD_NUM="3522"
|
||||||
|
|
||||||
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#define VERSION "4.2.0.3521"
|
#define VERSION "4.2.0.3522"
|
||||||
#define GENERATION "4.2"
|
#define GENERATION "4.2"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%define name fwbuilder
|
%define name fwbuilder
|
||||||
%define version 4.2.0.3521
|
%define version 4.2.0.3522
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
%if "%_vendor" == "MandrakeSoft"
|
%if "%_vendor" == "MandrakeSoft"
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
|
|||||||
Priority: extra
|
Priority: extra
|
||||||
Section: checkinstall
|
Section: checkinstall
|
||||||
Maintainer: vadim@fwbuilder.org
|
Maintainer: vadim@fwbuilder.org
|
||||||
Version: 4.2.0.3521-1
|
Version: 4.2.0.3522-1
|
||||||
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
||||||
Description: Firewall Builder GUI and policy compilers
|
Description: Firewall Builder GUI and policy compilers
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
%define name fwbuilder
|
%define name fwbuilder
|
||||||
%define version 4.2.0.3521
|
%define version 4.2.0.3522
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
%if "%_vendor" == "MandrakeSoft"
|
%if "%_vendor" == "MandrakeSoft"
|
||||||
|
|||||||
@@ -776,25 +776,20 @@ void FirewallInstaller::replaceMacrosInCommand(Configlet *conf)
|
|||||||
* Unix.
|
* Unix.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString fwbscript = fwcompiler::CompilerDriver::escapeFileName(
|
|
||||||
QFileInfo(cnf->remote_script).fileName());
|
|
||||||
|
|
||||||
if (fwbscript.indexOf(":")!=-1) fwbscript = fwbscript.section(':', 1, 1);
|
|
||||||
|
|
||||||
if (fwbdebug)
|
if (fwbdebug)
|
||||||
{
|
{
|
||||||
qDebug() << "Macro substitutions:";
|
qDebug() << "Macro substitutions:";
|
||||||
qDebug() << " $fwdir=" << cnf->fwdir;
|
qDebug() << " $fwdir=" << cnf->fwdir;
|
||||||
qDebug() << " cnf->script=" << cnf->script;
|
qDebug() << " cnf->script=" << cnf->script;
|
||||||
qDebug() << " cnf->remote_script=" << cnf->remote_script;
|
qDebug() << " cnf->remote_script=" << cnf->remote_script;
|
||||||
qDebug() << " $fwscript=" << fwbscript;
|
qDebug() << " $fwscript=" << cnf->fwscript;
|
||||||
qDebug() << " $firewall_name=" << QString::fromUtf8(
|
qDebug() << " $firewall_name=" << QString::fromUtf8(
|
||||||
cnf->fwobj->getName().c_str());
|
cnf->fwobj->getName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->setVariable("fwbprompt", fwb_prompt);
|
conf->setVariable("fwbprompt", fwb_prompt);
|
||||||
conf->setVariable("fwdir", cnf->fwdir);
|
conf->setVariable("fwdir", cnf->fwdir);
|
||||||
conf->setVariable("fwscript", fwbscript);
|
conf->setVariable("fwscript", cnf->fwscript);
|
||||||
conf->setVariable("firewall_name",
|
conf->setVariable("firewall_name",
|
||||||
QString::fromUtf8(cnf->fwobj->getName().c_str()));
|
QString::fromUtf8(cnf->fwobj->getName().c_str()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,5 +88,6 @@ void instConf::clear()
|
|||||||
sshArgs = "";
|
sshArgs = "";
|
||||||
scpArgs = "";
|
scpArgs = "";
|
||||||
putty_session = "";
|
putty_session = "";
|
||||||
|
fwscript = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class instConf {
|
|||||||
QString sshArgs;
|
QString sshArgs;
|
||||||
QString scpArgs;
|
QString scpArgs;
|
||||||
QString fwdir;
|
QString fwdir;
|
||||||
|
QString fwscript;
|
||||||
|
|
||||||
libfwbuilder::Firewall *fwobj;
|
libfwbuilder::Firewall *fwobj;
|
||||||
|
|
||||||
|
|||||||
@@ -28,15 +28,16 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "utils_no_qt.h"
|
#include "utils_no_qt.h"
|
||||||
|
|
||||||
#include "instDialog.h"
|
#include "CompilerDriver.h"
|
||||||
#include "FirewallInstallerCisco.h"
|
|
||||||
#include "FirewallInstallerUnx.h"
|
|
||||||
#include "FirewallInstallerProcurve.h"
|
|
||||||
#include "FWBSettings.h"
|
#include "FWBSettings.h"
|
||||||
#include "FWWindow.h"
|
#include "FWWindow.h"
|
||||||
#include "instOptionsDialog.h"
|
#include "FirewallInstallerCisco.h"
|
||||||
#include "instBatchOptionsDialog.h"
|
#include "FirewallInstallerProcurve.h"
|
||||||
|
#include "FirewallInstallerUnx.h"
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
|
#include "instBatchOptionsDialog.h"
|
||||||
|
#include "instDialog.h"
|
||||||
|
#include "instOptionsDialog.h"
|
||||||
|
|
||||||
#include "fwbuilder/Resources.h"
|
#include "fwbuilder/Resources.h"
|
||||||
#include "fwbuilder/FWObjectDatabase.h"
|
#include "fwbuilder/FWObjectDatabase.h"
|
||||||
@@ -62,6 +63,18 @@ bool instDialog::runInstaller(Firewall *fw, bool cancelAllVisible)
|
|||||||
cnf.fwobj = fw;
|
cnf.fwobj = fw;
|
||||||
cnf.maddr = "";
|
cnf.maddr = "";
|
||||||
|
|
||||||
|
// TODO: there must be a better place to fill cnd.fwscript than
|
||||||
|
// this. All I need to do is fill it before calling summary() and
|
||||||
|
// before launching installer that uses it in
|
||||||
|
// FirewallInstaller::replaceMacrosInCommand()
|
||||||
|
|
||||||
|
QString fwscript = fwcompiler::CompilerDriver::escapeFileName(
|
||||||
|
QFileInfo(cnf.remote_script).fileName());
|
||||||
|
|
||||||
|
if (fwscript.indexOf(":")!=-1) fwscript = fwscript.section(':', 1, 1);
|
||||||
|
|
||||||
|
cnf.fwscript = fwscript;
|
||||||
|
|
||||||
if (fwbdebug)
|
if (fwbdebug)
|
||||||
qDebug() << "instDialog::runInstaller: built-in installer"
|
qDebug() << "instDialog::runInstaller: built-in installer"
|
||||||
<< fw->getName().c_str()
|
<< fw->getName().c_str()
|
||||||
|
|||||||
@@ -497,10 +497,6 @@ void instDialog::summary()
|
|||||||
else
|
else
|
||||||
str.append(QObject::tr("* Management address : %1").arg(cnf.maddr));
|
str.append(QObject::tr("* Management address : %1").arg(cnf.maddr));
|
||||||
|
|
||||||
|
|
||||||
if (!cnf.putty_session.isEmpty())
|
|
||||||
str.append(QObject::tr("* Using putty session : %1")
|
|
||||||
.arg(cnf.putty_session));
|
|
||||||
str.append(QObject::tr("* Platform : %1")
|
str.append(QObject::tr("* Platform : %1")
|
||||||
.arg(cnf.fwobj->getStr("platform").c_str()));
|
.arg(cnf.fwobj->getStr("platform").c_str()));
|
||||||
str.append(QObject::tr("* Host OS : %1")
|
str.append(QObject::tr("* Host OS : %1")
|
||||||
@@ -515,6 +511,15 @@ void instDialog::summary()
|
|||||||
if (cnf.dry_run)
|
if (cnf.dry_run)
|
||||||
str.append(QObject::tr("* Commands will not be executed on the firewall"));
|
str.append(QObject::tr("* Commands will not be executed on the firewall"));
|
||||||
|
|
||||||
|
if (fwbdebug)
|
||||||
|
{
|
||||||
|
str.append(QObject::tr("--------------------------------"));
|
||||||
|
str.append(QObject::tr("* Variables:"));
|
||||||
|
str.append(QObject::tr("* fwdir= %1") .arg(cnf.fwdir));
|
||||||
|
str.append(QObject::tr("* fwscript= %1") .arg(cnf.fwscript));
|
||||||
|
str.append(QObject::tr("* remote_script= %1") .arg(cnf.remote_script));
|
||||||
|
}
|
||||||
|
|
||||||
str.append("");
|
str.append("");
|
||||||
|
|
||||||
QTextCursor cursor = m_dialog->procLogDisplay->textCursor();
|
QTextCursor cursor = m_dialog->procLogDisplay->textCursor();
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
## -*- mode: shell-script; -*-
|
||||||
|
##
|
||||||
|
## Lines that start with "##" will be removed before this code is
|
||||||
|
## added to the generated script.
|
||||||
|
##
|
||||||
|
## These are commands built-in policy installer runs on the firewall
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
##
|
||||||
|
## {{$rbtimeout}} -- rollback timeout
|
||||||
|
## {{$test}} -- doing installation in test mode
|
||||||
|
##
|
||||||
|
|
||||||
|
|
||||||
|
{{if cancel_rollback}}
|
||||||
|
reload cancel
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
|
{{if run}}
|
||||||
|
wr mem
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
|
{{if save_standby}}
|
||||||
|
wr standby
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
## -*- mode: shell-script; -*-
|
||||||
|
##
|
||||||
|
## Lines that start with "##" will be removed before this code is
|
||||||
|
## added to the generated script.
|
||||||
|
##
|
||||||
|
## These are commands built-in policy installer runs on the firewall
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
##
|
||||||
|
## {{$rbtimeout}} -- rollback timeout
|
||||||
|
## {{$test}} -- doing installation in test mode
|
||||||
|
##
|
||||||
|
|
||||||
|
{{if schedule_rollback}}
|
||||||
|
reload in {{$rbtimeout}}
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
## -*- mode: shell-script; -*-
|
||||||
|
##
|
||||||
|
## Lines that start with "##" will be removed before this code is
|
||||||
|
## added to the generated script. Regular shell comments can be added
|
||||||
|
## using single "#", these will appear in the script.
|
||||||
|
##
|
||||||
|
## These are commands built-in policy installer runs on the firewall
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
##
|
||||||
|
## {{$fwbprompt}} -- "magic" prompt that installer uses to detect when it is
|
||||||
|
## logged in
|
||||||
|
## {{$fwdir}} -- directory on the firewall (in case of PIX, "flash:" or
|
||||||
|
## similar)
|
||||||
|
## {{$fwscript}} -- script name on the firewall
|
||||||
|
## {{$firewall_name}} -- the name of the firewall object
|
||||||
|
##
|
||||||
|
|
||||||
|
{{if using_scp}}
|
||||||
|
changeto context {{$firewall_name}}
|
||||||
|
copy /noconfirm {{$fwdir}}/{{$fwscript}} running-config
|
||||||
|
changeto system
|
||||||
|
delete /noconfirm {{$fwdir}}/{{$fwscript}}
|
||||||
|
exit
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
|
{{if not_using_scp}}
|
||||||
|
config term
|
||||||
|
terminal width 256
|
||||||
|
{{$fwbuilder_generated_configuration_lines}}
|
||||||
|
exit
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
Reference in New Issue
Block a user