script for running wpkg on shutdown

tags/0.0.1
Daniel Berteaud 13 years ago
parent 45a4e6f876
commit 16042ec8b4
  1. 2
      createlinks
  2. 4
      ipasserelle-gp.spec
  3. 1
      root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/conf.bat/10All
  4. 34
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg/wpkg.bat/10All
  5. 0
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/settings/wpkg/wpkg.bat/template-begin

@ -14,3 +14,5 @@ templates2events("/home/e-smith/files/shares/wpkg/files/settings/fusioninventory
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 release 1.beta19
%define release 1.beta20
%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}
%{__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/{packages,softwares}
%install

@ -18,6 +18,7 @@ SET IPASSERELLE_HOME_URL=$url
SET COMPANY=$comp
SET SOFTWARE=\\\\%IPASSERELLE_IP%\\wpkg\\softwares
SET SETTINGS=\\\\%IPASSERELLE_IP%\\wpkg\\settings
SET WPKGLOGS=\\\\%IPASSERELLE_IP%\\wpkglogs
EOF

@ -0,0 +1,34 @@
{
my $ip = $InternalInterface{'IPAddress'};
my $nt = $smb{'Workgrpup'};
my $pass = $wpkg{'UserPassword'};
my $out .=<<"EOF";
@echo off
cls
echo.
echo. _________________________________________________________
echo i\ _______________________________________________________\
echo. i i i
echo i i Mises a jour en cours. N'eteignez pas l'ordinateur i
echo. i i i
echo i i Il s'eteindra lui-meme a la fin des operations i
echo. i i i
echo \i________________________________________________________i
echo.
echo.
net use \\\\$ip\\wpkg /user:$nt\\deploiement $pass >NUL
net use \\\\$ip\\wpkglogs /user:$nt\deploiement $pass >NUL
set SOFTWARE=\\\\$ip\\wpkg\\softwares
set SETTINGS=\\\\$ip\\wpkg\\settings
set WPKGLOGS=\\\\$ip\\wpkglogs
cscript //Nologo \\\\$ip\\wpkg\\wpkg.js /synchronize /nonotify /quiet
EOF
$out =~ s/\n/\r\n/g;
$OUT = $out;
}
Loading…
Cancel
Save