diff --git a/createlinks b/createlinks index 3337e28..116e41f 100644 --- a/createlinks +++ b/createlinks @@ -4,15 +4,8 @@ use esmith::Build::CreateLinks qw(:all); event_link("wpkg-init", "wpkg-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"); -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/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)); diff --git a/ipasserelle-gp.spec b/ipasserelle-gp.spec index 945f1d1..c91a340 100644 --- a/ipasserelle-gp.spec +++ b/ipasserelle-gp.spec @@ -1,5 +1,5 @@ %define version 0.0.1 -%define release 1.beta24 +%define release 1.beta25 %define name ipasserelle-gp @@ -32,7 +32,7 @@ Basé sur WPKG et d'autres outils %build 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} %install diff --git a/root/etc/e-smith/db/configuration/defaults/wpkg/RsyncServer b/root/etc/e-smith/db/configuration/defaults/wpkg/RsyncServer deleted file mode 100644 index e6105fe..0000000 --- a/root/etc/e-smith/db/configuration/defaults/wpkg/RsyncServer +++ /dev/null @@ -1 +0,0 @@ -rsync.firewall-services.com::wpkg_packages diff --git a/root/etc/e-smith/db/configuration/migrate/WpkgVNCPassword b/root/etc/e-smith/db/configuration/migrate/WpkgVNCPassword deleted file mode 100644 index 41eb7d0..0000000 --- a/root/etc/e-smith/db/configuration/migrate/WpkgVNCPassword +++ /dev/null @@ -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); -} -} diff --git a/root/etc/e-smith/events/actions/wpkg-update-packages b/root/etc/e-smith/events/actions/wpkg-update-packages deleted file mode 100644 index e64b7fa..0000000 --- a/root/etc/e-smith/events/actions/wpkg-update-packages +++ /dev/null @@ -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 diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/10All b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/10All deleted file mode 100644 index 3ebe651..0000000 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/10All +++ /dev/null @@ -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; - -} diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/template-begin b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x64.reg/template-begin deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/10All b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/10All deleted file mode 100644 index f8c0bfb..0000000 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/10All +++ /dev/null @@ -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; - -} diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/template-begin b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/fusioninventory/fusioninventory_x86.reg/template-begin deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/10All b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/10All deleted file mode 100644 index 515e00b..0000000 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/10All +++ /dev/null @@ -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; -} diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/template-begin b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg/template-begin deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/10All b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/10All deleted file mode 100644 index cab7333..0000000 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/10All +++ /dev/null @@ -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; -} diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/template-begin b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg/template-begin deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/10All b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/10All deleted file mode 100644 index cd2f749..0000000 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/10All +++ /dev/null @@ -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; - -} - diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/template-begin b/root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg-gp/Wpkg-GP.ini/template-begin deleted file mode 100644 index e69de29..0000000