mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-18 17:27:20 +01:00
added installation configlets for fwsm
This commit is contained in:
parent
28b95bb3b3
commit
7e5de74f39
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,6 +25,7 @@ test/ipt/secuwall-1
|
||||
Makefile
|
||||
!test/*/Makefile
|
||||
install*
|
||||
!src/res/configlets/*/install*
|
||||
ltmain.sh
|
||||
configure
|
||||
config.h
|
||||
|
||||
2
VERSION
2
VERSION
@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
|
||||
# build number is like "nano" version number. I am incrementing build
|
||||
# number during development cycle
|
||||
#
|
||||
BUILD_NUM="3521"
|
||||
BUILD_NUM="3522"
|
||||
|
||||
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"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.2.0.3521
|
||||
%define version 4.2.0.3522
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
|
||||
Priority: extra
|
||||
Section: checkinstall
|
||||
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
|
||||
Description: Firewall Builder GUI and policy compilers
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.2.0.3521
|
||||
%define version 4.2.0.3522
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -776,25 +776,20 @@ void FirewallInstaller::replaceMacrosInCommand(Configlet *conf)
|
||||
* Unix.
|
||||
*/
|
||||
|
||||
QString fwbscript = fwcompiler::CompilerDriver::escapeFileName(
|
||||
QFileInfo(cnf->remote_script).fileName());
|
||||
|
||||
if (fwbscript.indexOf(":")!=-1) fwbscript = fwbscript.section(':', 1, 1);
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
qDebug() << "Macro substitutions:";
|
||||
qDebug() << " $fwdir=" << cnf->fwdir;
|
||||
qDebug() << " cnf->script=" << cnf->script;
|
||||
qDebug() << " cnf->remote_script=" << cnf->remote_script;
|
||||
qDebug() << " $fwscript=" << fwbscript;
|
||||
qDebug() << " $fwscript=" << cnf->fwscript;
|
||||
qDebug() << " $firewall_name=" << QString::fromUtf8(
|
||||
cnf->fwobj->getName().c_str());
|
||||
}
|
||||
|
||||
conf->setVariable("fwbprompt", fwb_prompt);
|
||||
conf->setVariable("fwdir", cnf->fwdir);
|
||||
conf->setVariable("fwscript", fwbscript);
|
||||
conf->setVariable("fwscript", cnf->fwscript);
|
||||
conf->setVariable("firewall_name",
|
||||
QString::fromUtf8(cnf->fwobj->getName().c_str()));
|
||||
}
|
||||
|
||||
@ -88,5 +88,6 @@ void instConf::clear()
|
||||
sshArgs = "";
|
||||
scpArgs = "";
|
||||
putty_session = "";
|
||||
fwscript = "";
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +64,7 @@ class instConf {
|
||||
QString sshArgs;
|
||||
QString scpArgs;
|
||||
QString fwdir;
|
||||
QString fwscript;
|
||||
|
||||
libfwbuilder::Firewall *fwobj;
|
||||
|
||||
|
||||
@ -28,15 +28,16 @@
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "instDialog.h"
|
||||
#include "FirewallInstallerCisco.h"
|
||||
#include "FirewallInstallerUnx.h"
|
||||
#include "FirewallInstallerProcurve.h"
|
||||
#include "CompilerDriver.h"
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "instOptionsDialog.h"
|
||||
#include "instBatchOptionsDialog.h"
|
||||
#include "FirewallInstallerCisco.h"
|
||||
#include "FirewallInstallerProcurve.h"
|
||||
#include "FirewallInstallerUnx.h"
|
||||
#include "events.h"
|
||||
#include "instBatchOptionsDialog.h"
|
||||
#include "instDialog.h"
|
||||
#include "instOptionsDialog.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
@ -62,6 +63,18 @@ bool instDialog::runInstaller(Firewall *fw, bool cancelAllVisible)
|
||||
cnf.fwobj = fw;
|
||||
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)
|
||||
qDebug() << "instDialog::runInstaller: built-in installer"
|
||||
<< fw->getName().c_str()
|
||||
|
||||
@ -497,10 +497,6 @@ void instDialog::summary()
|
||||
else
|
||||
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")
|
||||
.arg(cnf.fwobj->getStr("platform").c_str()));
|
||||
str.append(QObject::tr("* Host OS : %1")
|
||||
@ -515,6 +511,15 @@ void instDialog::summary()
|
||||
if (cnf.dry_run)
|
||||
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("");
|
||||
|
||||
QTextCursor cursor = m_dialog->procLogDisplay->textCursor();
|
||||
|
||||
27
src/res/configlets/fwsm_os/installer_commands_post_config
Normal file
27
src/res/configlets/fwsm_os/installer_commands_post_config
Normal file
@ -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}}
|
||||
|
||||
|
||||
19
src/res/configlets/fwsm_os/installer_commands_pre_config
Normal file
19
src/res/configlets/fwsm_os/installer_commands_pre_config
Normal file
@ -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}}
|
||||
|
||||
|
||||
|
||||
33
src/res/configlets/fwsm_os/installer_commands_reg_user
Normal file
33
src/res/configlets/fwsm_os/installer_commands_reg_user
Normal file
@ -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}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user