Pass through "ofc" only once per UpdateGenerator execution

Re: Pass through "ofc" only once per UpdateGenerator executi

Postby hbuhrmester » 19.01.2016, 17:33

Hello,

this sound like a good idea to me, and it doesn't need additional date calculations, which I wouldn't know how to implement in DOS anyway.

Greetings,
Hartmut
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: Pass through "ofc" only once per UpdateGenerator executi

Postby Denniss » 20.01.2016, 14:09

WSUSUpdateAdmin wrote:Hi!

I implemented the following now (line 1070+):

Code: Select all
  echo %DATE% %TIME% - Info: Verified integrity of existing updates for %1 %2>>%DOWNLOAD_LOGFILE%
  for %%i in (..\client\md\hashes-%1-%2.txt) do echo _%%~ti | %SystemRoot%\System32\find.exe "_%DATE:~-10%" >nul 2>&1
  if not errorlevel 1 (
    if exist ..\exclude\ExcludeList-superseded.txt (
      for %%i in (..\exclude\ExcludeList-superseded.txt) do echo _%%~ti | %SystemRoot%\System32\find.exe "_%DATE:~-10%" >nul 2>&1
      if errorlevel 1 (
        echo Skipping download/validation of %1 %2 due to 'same day' rule.
        echo %DATE% %TIME% - Info: Skipped download/validation of %1 %2 due to 'same day' rule>>%DOWNLOAD_LOGFILE%
        goto :eof
      )
    )
  )
  del ..\client\md\hashes-%1-%2.txt

That means, 'same day' rule will fire if hashes-%1-%2.txt has timestamp from today (thanks, Hartmut! :) ) and ExcludeList-superseded.txt has timestamp not from today, i.e. older.
This will also consider changed wsusscn2.cab files, because ExcludeList-superseded.txt will always be recalculated then.
Please verify this 'goto :eof' is correct - my WOU stops after skipping win glb. In cmd window it ask me to press a key then update generator errors out.
Denniss
 
Posts: 869
Joined: 01.08.2009, 10:51

Re: Pass through "ofc" only once per UpdateGenerator executi

Postby WSUSUpdateAdmin » 20.01.2016, 17:05

:o :oops:

Fixed in r720.

Thanks & regards,
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Pass through "ofc" only once per UpdateGenerator executi

Postby Schrabs » 21.01.2016, 11:10

Ich hätte mir folgendes gewünscht:

    1. In jedem Produkt-Verzeichnis eine Datei (builddate.txt) mit dem Zeitstempel, wann zuletzt Updates heruntergeladen wurden. Die globale Anzeige "Medium build date: ****" sagt eigentlich nicht aus, ob auch die Produkt-Verzeichnisse aktuell sind.
    2. Mit den builddate.txt könnte abgeglichen werden, ob sie älter/jünger sind als die wsusscn2.cab. Bei "jünger" könnte man sich den Download prinzipiell ersparen (ggf. als Option).
    3. Das Entpacken von package.xml aus wsusscn2.cab muss nur erfolgen, wenn sich die wsusscn2.cab ändert - quasi analog "Determining superseded updates".

Gruß Schrabs
Schrabs
 

Previous

Return to Anregungen / Suggestions

Who is online

Users browsing this forum: No registered users and 32 guests