[wpkg-users] Wpkg restart count exceeded

Rainer Meier r.meier at wpkg.org
Thu Dec 11 08:44:34 CET 2008


Hi Mike,

> Yes of course, but we have only 1 Windows-Server, so we don't want to 
> setup a WSUS Server
> I made such a package file,
> 
> I took it from http://wpkg.org/Heise_Offline-Update
> It looks like that:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <packages>
> <package
> 	id="offlineupdate"
> 	name="offlineupdate"
> 	revision="200812092"
> 	reboot="true"
> 	priority="0">
>  
> 	<check type="file" condition="exists" 
> path="%SystemDrive%\netinst\wpkg\offlineupdate.log" />
>  
> 	<install cmd='cmd /c %WPKGROOT%\scripts\offlineupdate.cmd' />
[...]

So the package just executes "offlineupdate.cmd" and after executing
this command it will issue a reboot (one single reboot).

However it might be that the "offlineupdate.cmd" is somehow issuing
reboots as well. If a script during package installation is forcing a
reboot this will terminate WPKG in the middle of its execution. Usually
this is not a problem since on next reboot it will execute the checks to
see wether the offline update has been executed or not.

Just the checks do not appear to be very specific. I guess the log file
is written right at the beginning of the update process. So let's
imagine the offlineupdate.cmd executes some updates and creates this log
file. Then (before finishing it's job completely) it is forcing a
reboot. WPKG is terminated then.

If this was a first installation WPKG will execute the checks at next
reboot and detect that the package is already installed (checks are
true) and then it will not execute offlineupdate.cmd again.

If this would be an uppgrade (revision number just changed) WPKG will
detect that it should be upgraded and executes the offlineupdate.cmd
again on next reboot until it finishes.


So personally I would enhance (or assure) that offlineupdate.cmd is
writing/creating a specific "marker"-file only when it finished its job
completely (like "%SystemDrive%\netinst\wpkg\update-done.log") and check
for its existence. Then you make sure that the very last line of
offlineupdate.cmd is writing this file (so for sure all commands have
been executed then).


Honestly it's still not clear to me what you meant by "Is it possible to
tell wpkg that it should allow more reboots than 5?". The package you're
using is just issuing one single reboot after execution. But as I said
perhaps the offlineupdate.cmd (or updates run by it) will issue
intermediate reboots.


br,
Rainer


btw. please reply to the list too.



More information about the wpkg-users mailing list