nettoyage des scripts et templates spécifiques aux packages

tags/0.1.0
Daniel Berteaud 13 years ago
parent 5c77b97fd2
commit 0cc924a6df
  1. 7
      createlinks
  2. 4
      ipasserelle-gp.spec
  3. 1
      root/etc/e-smith/db/configuration/defaults/wpkg/RsyncServer
  4. 10
      root/etc/e-smith/db/configuration/migrate/WpkgVNCPassword
  5. 19
      root/etc/e-smith/events/actions/wpkg-update-packages
  6. 34
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/10All
  7. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/template-begin
  8. 34
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/10All
  9. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/template-begin
  10. 54
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/10All
  11. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/template-begin
  12. 54
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/10All
  13. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/template-begin
  14. 36
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/10All
  15. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/template-begin

@ -4,15 +4,8 @@ use esmith::Build::CreateLinks qw(:all);
event_link("wpkg-init", "wpkg-update", "20"); event_link("wpkg-init", "wpkg-update", "20");
event_link("wpkg-init", "ipasserelle-update", "20"); event_link("wpkg-init", "ipasserelle-update", "20");
event_link("wpkg-update-packages", "wpkg-update", "30");
event_link("initialize-default-databases", "wpkg-update", "02"); event_link("initialize-default-databases", "wpkg-update", "02");
templates2events("/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/tools/files/scripts/conf.bat", qw(wpkg-update bootstrap-console-save)); templates2events("/home/e-smith/files/shares/tools/files/scripts/conf.bat", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/config.xml", qw(wpkg-update bootstrap-console-save)); templates2events("/home/e-smith/files/shares/wpkg/files/config.xml", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/settings/wpkg/wpkg.bat", qw(wpkg-update bootstrap-console-save));

@ -1,5 +1,5 @@
%define version 0.0.1 %define version 0.0.1
%define release 1.beta24 %define release 1.beta25
%define name ipasserelle-gp %define name ipasserelle-gp
@ -32,7 +32,7 @@ Basé sur WPKG et d'autres outils
%build %build
perl createlinks perl createlinks
%{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/settings/{fusioninventory,wpkg-gp,tightvnc,wpkg} %{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/settings/{wpkg-gp,tightvnc,wpkg}
%{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/{packages,softwares} %{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/{packages,softwares}
%install %install

@ -1 +0,0 @@
rsync.firewall-services.com::wpkg_packages

@ -1,10 +0,0 @@
{
my $rec = $DB->get('wpkg') || $DB->new_record('wpkg', { type => 'service' });
my $pw = $rec->prop('VNCPassword');
if (not $pw){
$pw = `/usr/bin/openssl rand -base64 6`;
chomp($pw);
$rec->set_prop('VNCPassword', $pw);
}
}

@ -1,19 +0,0 @@
#!/bin/bash
UPDATE=$(db configuration getprop wpkg UpdatePackages || echo enabled)
if [ "$UPDATE" == "disabled" ]; then
exit 0
fi
USER=$(db configuration getprop wpkg RsyncUser || echo $(db configuration get DomainName))
PASS=$(db configuration getprop wpkg RsyncPassword || echo secret)
SERVER=$(db configuration getprop wpkg RsyncServer || echo not.set)
if [ "$PASS" == "secret" ]; then
/usr/bin/rsync -rtPz $SERVER /home/e-smith/files/shares/wpkg/files/
else
RSYNC_PASSWORD=$PASS /usr/bin/rsync -rtPz $USER@$SERVER /home/e-smith/files/shares/wpkg/files/
fi
/etc/e-smith/events/actions/share-modify share-modify-files wpkg

@ -1,34 +0,0 @@
Windows Registry Editor Version 5.00
{
my $server = ${'fusioninventory-agent'}{'Server'} || 'https://inventory.firewall-services.com/';
my $user = ${'fusioninventory-agent'}{'User'} || $DomainName;
my $pass = ${'fusioninventory-agent'}{'Password'} || 'secret';
my $out .=<<"EOF";
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\FusionInventory-Agent]
"server"="$server"
"tag"="$DomainName"
"user"="$user"
"password"="$pass"
"realm"=""
"ca-cert-file"=""
"no-ssl-check"="0"
"proxy"=""
"rpc-port"=""
"debug"="1"
"rpc-trust-localhost"="1"
"scan-homedirs"="0"
"basevardir"="C:\\\\Program Files (x86)\\\\FusionInventory-Agent\\\\dumps"
"share-dir"="C:\\\\Program Files (x86)\\\\FusionInventory-Agent\\\\share"
"logfile"="C:\\\\Program Files (x86)\\\\FusionInventory-Agent\\\\agent-log.txt"
"logfile-maxsize"="5"
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}

@ -1,34 +0,0 @@
Windows Registry Editor Version 5.00
{
my $server = ${'fusioninventory-agent'}{'Server'} || 'https://inventory.firewall-services.com/';
my $user = ${'fusioninventory-agent'}{'User'} || $DomainName;
my $pass = ${'fusioninventory-agent'}{'Password'} || 'secret';
my $out .=<<"EOF";
[HKEY_LOCAL_MACHINE\\SOFTWARE\\FusionInventory-Agent]
"server"="$server"
"tag"="$DomainName"
"user"="$user"
"password"="$pass"
"realm"=""
"ca-cert-file"=""
"no-ssl-check"="0"
"proxy"=""
"rpc-port"=""
"debug"="1"
"rpc-trust-localhost"="1"
"scan-homedirs"="0"
"basevardir"="C:\\\\Program Files\\\\FusionInventory-Agent\\\\dumps"
"share-dir"="C:\\\\Program Files\\\\FusionInventory-Agent\\\\share"
"logfile"="C:\\\\Program Files\\\\FusionInventory-Agent\\\\agent-log.txt"
"logfile-maxsize"="5"
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}

@ -1,54 +0,0 @@
Windows Registry Editor Version 5.00
{
use Crypt::DES;
my $clear = $wpkg{'VNCPassword'} || 'secretpassword';
$clear = substr $clear, 0, 8;
my $key = pack ('H16', "E84AD660C4721AE0");
my $des = Crypt::DES->new($key);
my $crypt = $des->encrypt($clear);
my $pass = join(',', map {unpack('H2', $_)} split //, $crypt);
my $out =<<"EOF";
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\TightVNC\\Server]
"ExtraPorts"=""
"QueryTimeout"=dword:0000001e
"QueryAcceptOnTimeout"=dword:00000000
"LocalInputPriorityTimeout"=dword:00000003
"LocalInputPriority"=dword:00000000
"BlockRemoteInput"=dword:00000000
"BlockLocalInput"=dword:00000000
"IpAccessControl"=""
"RfbPort"=dword:0000170c
"HttpPort"=dword:000016a8
"DisconnectAction"=dword:00000000
"AcceptRfbConnections"=dword:00000001
"UseVncAuthentication"=dword:00000001
"UseControlAuthentication"=dword:00000001
"LoopbackOnly"=dword:00000000
"AcceptHttpConnections"=dword:00000000
"LogLevel"=dword:00000000
"EnableFileTransfers"=dword:00000001
"BlankScreen"=dword:00000000
"RemoveWallpaper"=dword:00000001
"EnableUrlParams"=dword:00000001
"Password"=hex:$pass
"AlwaysShared"=dword:00000000
"NeverShared"=dword:00000000
"DisconnectClients"=dword:00000001
"PollingInterval"=dword:000003e8
"AllowLoopback"=dword:00000000
"VideoRecognitionInterval"=dword:00000bb8
"GrabTransparentWindows"=dword:00000001
"SaveLogToAllUsersPath"=dword:00000000
"RunControlInterface"=dword:00000001
"VideoClasses"=""
"ControlPassword"=hex:$pass
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}

@ -1,54 +0,0 @@
Windows Registry Editor Version 5.00
{
use Crypt::DES;
my $clear = $wpkg{'VNCPassword'} || 'secretpassword';
$clear = substr $clear, 0, 8;
my $key = pack ('H16', "E84AD660C4721AE0");
my $des = Crypt::DES->new($key);
my $crypt = $des->encrypt($clear);
my $pass = join(',', map {unpack('H2', $_)} split //, $crypt);
my $out =<<"EOF";
[HKEY_LOCAL_MACHINE\\SOFTWARE\\TightVNC\\Server]
"ExtraPorts"=""
"QueryTimeout"=dword:0000001e
"QueryAcceptOnTimeout"=dword:00000000
"LocalInputPriorityTimeout"=dword:00000003
"LocalInputPriority"=dword:00000000
"BlockRemoteInput"=dword:00000000
"BlockLocalInput"=dword:00000000
"IpAccessControl"=""
"RfbPort"=dword:0000170c
"HttpPort"=dword:000016a8
"DisconnectAction"=dword:00000000
"AcceptRfbConnections"=dword:00000001
"UseVncAuthentication"=dword:00000001
"UseControlAuthentication"=dword:00000001
"LoopbackOnly"=dword:00000000
"AcceptHttpConnections"=dword:00000000
"LogLevel"=dword:00000000
"EnableFileTransfers"=dword:00000001
"BlankScreen"=dword:00000000
"RemoveWallpaper"=dword:00000001
"EnableUrlParams"=dword:00000001
"Password"=hex:$pass
"AlwaysShared"=dword:00000000
"NeverShared"=dword:00000000
"DisconnectClients"=dword:00000001
"PollingInterval"=dword:000003e8
"AllowLoopback"=dword:00000000
"VideoRecognitionInterval"=dword:00000bb8
"GrabTransparentWindows"=dword:00000001
"SaveLogToAllUsersPath"=dword:00000000
"RunControlInterface"=dword:00000001
"VideoClasses"=""
"ControlPassword"=hex:$pass
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}

@ -1,36 +0,0 @@
{
my $ip = $InternalInterface{'IPAddress'};
my $wg = $smb{'Workgroup'};
my $secret = $wpkg{'UserPassword'} || 'secret';
my $out .=<<"EOF";
[WpkgConfig]
EnableViaLGP = 1
IgnoreGroupPolicy = 0
DisableAtBootUp = 0
WpkgCommand = \\\\$ip\\wpkg\\wpkg.js /synchronize /debug /nonotify
WpkgVerbosity = 1
WpkgNetworkUsername = $wg\\deploiement
WpkgNetworkPassword = "clear:$secret"
WpkgMaxReboots = 10
WpkgRebootPolicy = force
WpkgExecuteByNonAdmins = 0
WpkgExecuteByLocalUsers = 1
WpkgActivityIndicator = 1
[EnvironmentVariables]
SOFTWARE = \\\\$ip\\wpkg\\softwares
SETTINGS = \\\\$ip\\wpkg\\settings
WPKGLOGS = \\\\$ip\\wpkglogs
IPASSERELLE_IP = $ip
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}
Loading…
Cancel
Save