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: 3327
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


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


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: 1412
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


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


Benutzeravatar
d.oertel
uib-Team
Beiträge: 3327
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


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


Antworten