Reinstalling the preloginloader / changing the opsi server

Antworten
bhearsum
Beiträge: 48
Registriert: 17 Jun 2009, 18:12

Reinstalling the preloginloader / changing the opsi server

Beitrag von bhearsum »

Hi Everyone,

I'm in a situation where I have a group of machines being managed with OPSI. We have two OPSI servers and sometimes we need to switch clients between the two. I'm having trouble making this happen. I've tried uninstalling the preloginloader with deinstall.cmd. It appears to work, and the system reboots OK. I then reinstall the preloginloader with service_setup.cmd. The client registers with the OSPI server When the system reboots I get the following error:
http://www.grabup.com/uploads/e52425918 ... 0ae4ec.png

("C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\preloginloader.log" could not be created as logfile. Exception "Ungultiger Dateiname".

However, after rebooting for a second time everything works.

I'd really like to make it work on the first reboot though. Anyone have ideas?
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Reinstalling the preloginloader / changing the opsi server

Beitrag von d.oertel »

Hi bhearsum,

hmm -
you may try to replace in the service_setup.cmd
the lines

Code: Alles auswählen

if not exist files\opsi\utils\winst32.exe goto :winstmissing

files\opsi\utils\winst32.exe /batch files\opsi\preloginloader.ins %TEMP%\preloginloader.log /PARAMETER INSTALL:CREATE_CLIENT

by this

Code: Alles auswählen

if exist c:\tmp goto :startwinst
mkdir c:\tmp
:startwinst
if not exist files\opsi\utils\winst32.exe goto :winstmissing

files\opsi\utils\winst32.exe /batch files\opsi\preloginloader.ins c:\tmp\preloginloader.log /PARAMETER INSTALL:CREATE_CLIENT
it is also changed in the preloginloader 3.4 product (which costs money at the moment) which also is enabled for pushing installations without a reboot:
via web service call or by

Code: Alles auswählen

/usr/share/opsi/opsi-fire-event.py <client-id> gui_startup
this may according to https://bugzilla.mozilla.org/show_bug.cgi?id=474572 interest you......

Give me a notice if the code replace does not works.

regrads

detlef oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
bhearsum
Beiträge: 48
Registriert: 17 Jun 2009, 18:12

Re: Reinstalling the preloginloader / changing the opsi server

Beitrag von bhearsum »

I'll give that a try - is there any way to do this without modifying installed files, though?
bhearsum
Beiträge: 48
Registriert: 17 Jun 2009, 18:12

Re: Reinstalling the preloginloader / changing the opsi server

Beitrag von bhearsum »

Unfortunately, your suggestion didn't work. Here's the error:
The system cannot find the batch label specified - startwinst.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: Reinstalling the preloginloader / changing the opsi server

Beitrag von wolfbardo »

bhearsum hat geschrieben: I'm in a situation where I have a group of machines being managed with OPSI. We have two OPSI servers and sometimes we need to switch clients between the two.
start service_setup.cmd from second opsi-server and delete the Client from the first server with

Code: Alles auswählen

opsi-admin -d method deleteClient <clientId>
regards

Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Reinstalling the preloginloader / changing the opsi server

Beitrag von d.oertel »

Hi bhearsum
bhearsum hat geschrieben: The system cannot find the batch label specified - startwinst.
hmm - the label is in the code

Code: Alles auswählen

    if exist c:\tmp goto :startwinst
    mkdir c:\tmp
    :startwinst
    if not exist files\opsi\utils\winst32.exe goto :winstmissing

    files\opsi\utils\winst32.exe /batch files\opsi\preloginloader.ins c:\tmp\preloginloader.log /PARAMETER INSTALL:CREATE_CLIENT

The problem is that the run of the preloginloader.ins script leaves behind a registry entry which log file is to use next.
And this registry entry points to a directory or file wich is not usable after the first reboot.
Yes - this is a bug.
With the change above the log file is in c:\tmp\ which is always there.

Could you please check the code again.

regards

detlef oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Antworten