mir ist aufgefallen, dass ich keine Fehlermeldungen ins lokale Log beim shutdown bekomme. Ich habe mir also mal das opsiclientd Skript unter %programfiles(x86)%\opsi.org\opsi-client-agent\on_shutdown\doinstall##.cmd angeschaut und bemerkt dass ihr den stderr nicht umleitet, was dazu führt dass die Fehlermeldungen angezeigt werden, aber nicht ins log umgeleitet werden.
Außerdem ist die zusätzliche Datei "enter.txt" überflüssig, da man dem "date" Befehl einfach ein "/T" übergeben kann. Hier mal meine Version des Skriptes. Könnt ihr gerne verwenden.
64bit:
Code: Alles auswählen
@echo off
rem *****************************************************************
rem opsiclientd_shutdown_starter.exe performs the following actions:
rem - read credentials from opsiclientd.conf
rem - connect to opsiclientd
rem - read backend info for modules file
rem (module on_shutdown is activated?)
rem - fire event on_shutdown (default=gui_startup)
rem to start product Installation on client
rem - wait for completion of installation (end of task)
rem *****************************************************************
set logFile=C:\opsi.org\tmp\doinstall.log
echo Start opsi product installation ...
echo doinstall64.cmd started > "%logFile%"
date /T >> "%logFile%"
cd "%ProgramFiles(x86)%\opsi.org\opsi-client-agent" >> "%logFile%"
opsiclientd_shutdown_starter.exe on_shutdown 1>> "%logFile%" 2>&1
Code: Alles auswählen
@echo off
rem *****************************************************************
rem opsiclientd_shutdown_starter.exe performs the following actions:
rem - read credentials from opsiclientd.conf
rem - connect to opsiclientd
rem - read backend info for modules file
rem (module on_shutdown is activated?)
rem - fire event on_shutdown (default=gui_startup)
rem to start product Installation on client
rem - wait for completion of installation (end of task)
rem *****************************************************************
set logFile=C:\opsi.org\tmp\doinstall.log
echo Start opsi product installation ...
echo doinstall64.cmd started > "%logFile%"
date /T >> "%logFile%"
cd "%ProgramFiles%\opsi.org\opsi-client-agent" >> "%logFile%"
opsiclientd_shutdown_starter.exe on_shutdown 1>> "%logFile%" 2>&1
Luca