From bb370e0552ff58505e1cd350c45a85b6372845ab Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 17 May 2016 10:02:55 +0200 Subject: [PATCH] Use a shutdown script to upgrade FWSUpdates --- packages/fwsupdates.xml | 9 +++++---- .../shares/tools/files/scripts/fwsupdates/install.bat/20script | 2 ++ softwares/{offline_upgrade.bat => fwsupdates_upgrade.bat} | 0 3 files changed, 7 insertions(+), 4 deletions(-) rename softwares/{offline_upgrade.bat => fwsupdates_upgrade.bat} (100%) diff --git a/packages/fwsupdates.xml b/packages/fwsupdates.xml index 768abf7..30005e3 100755 --- a/packages/fwsupdates.xml +++ b/packages/fwsupdates.xml @@ -6,12 +6,13 @@ reboot="false" priority="95"> - + + @@ -35,10 +36,10 @@ + - - - + + diff --git a/root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/fwsupdates/install.bat/20script b/root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/fwsupdates/install.bat/20script index b163f73..0113447 100644 --- a/root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/fwsupdates/install.bat/20script +++ b/root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/fwsupdates/install.bat/20script @@ -1,6 +1,7 @@ net use \\%IPASSERELLE_IP%\wpkg if not exist "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" mkdir "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" copy /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\fwsupdates.vbs" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\" +copy /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\fwsupdates_upgrade.bat "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\" del /q "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\wpkg.bat" if not exist "%SystemDrive%\FWSUpdates" mkdir "%SystemDrive%\FWSUpdates" xcopy /E /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\FWSUpdates\*" "%SystemDrive%\FWSUpdates\" @@ -24,6 +25,7 @@ regedit /S "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\gp.reg" regedit /S "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\dav_limit.reg" regini "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\run_on_shutdown_reg.txt" cscript //Nologo "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\localgp.vbs" fwsupdates.vbs false MACHINE +cscript //Nologo "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\localgp.vbs" fwsupdates_upgrade.bat false MACHINE cscript "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\create_shortcut.vbs" schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\FWSUpdates\bin\delayed_sync.bat" /f robocopy /MIR /R:10 \\%IPASSERELLE_IP%\wpkg\ %SystemDrive%\FWSUpdates\repository\ diff --git a/softwares/offline_upgrade.bat b/softwares/fwsupdates_upgrade.bat similarity index 100% rename from softwares/offline_upgrade.bat rename to softwares/fwsupdates_upgrade.bat