[fixed] drvload only load one network driver

Antworten
Benutzeravatar
Antarion
Beiträge: 25
Registriert: 10 Jan 2017, 09:52

[fixed] drvload only load one network driver

Beitrag von Antarion »

Hi,
opsi-atftp 0.7.dfsg-14
opsi-atftpd 0.7.dfsg-14
opsi-configed 4.0.7.6.34-2
opsi-depotserver 4.0.7.3-3
opsi-linux-bootimage 20180813-1
opsi-utils 4.0.7.20-1
opsiconfd 4.0.7.14-2
opsipxeconfd 4.0.7.9-4
python-opsi 4.0.7.69-1
We updated the opsi-linux-bootimage to the version 20180813-1 and we got the error message :

"this is a opsi 4.0 product" .

I found this forum post suggesting me to update my win10-x64 package with the new python scripts and so i did.

I used this package to update mine : https://download.uib.de/opsi4.0/product ... .0-14.opsi

Now when i'm staging a computer using this image and it only loads one network drivers (the first in the list) instead of all the list in the txt file drvloadlist.txt like it used before.

Can you please help me?

Thank you.
Zuletzt geändert von Antarion am 22 Feb 2019, 11:01, insgesamt 2-mal geändert.
Benutzeravatar
Antarion
Beiträge: 25
Registriert: 10 Jan 2017, 09:52

Re: drvload only load one network driver

Beitrag von Antarion »

i checked the code in setup.opsiscript and it seems that it is working as intended.
If ONE driver is loaded successfully, it doesn't load the others, even if the one successfully loaded doesn't work properly...

SET drvloadlist=c:\opsi\drvloadlist.txt
if not EXIST %drvloadlist% (
echo There is no matching network driver in your repository!
echo Please add a matching network driver and restart the install process. You also may use an external driver
pause;
Exit
)
for /F "tokens=1,* delims=" %%i in (%drvloadlist%) do call :drvload %%i

:drvload
drvload %1

if not %ERRORLEVEL% == 0 goto linedelete
goto mountshare
:linedelete
echo Removing non working driver from drvList!
@echo off
setlocal
set /a i=0
set file=%drvloadlist%
for /f "tokens=1,* delims=" %%a in (%file%) do call :line %%a
goto :end
:line
set /a i+= 1
if %i% gtr 1 echo %* >> %file%.new
goto :eof
:end
ren %file% %file%.bak
ren %file%.new %file%
del %file%.bak
Exit
endloca
Benutzeravatar
Antarion
Beiträge: 25
Registriert: 10 Jan 2017, 09:52

Re: drvload only load one network driver

Beitrag von Antarion »

Ok i fixed it by bypassing the tests :
for /F "tokens=1,* delims=" %%i in (%drvloadlist%) do drvload %%i

goto mountshare
So now it loads all the drivers then go to mountshare ignoring all of :
:drvload
drvload %1

if not %ERRORLEVEL% == 0 goto linedelete
goto mountshare
:linedelete
echo Removing non working driver from drvList!
@echo off
setlocal
set /a i=0
set file=%drvloadlist%
for /f "tokens=1,* delims=" %%a in (%file%) do call :line %%a
goto :end
:line
set /a i+= 1
if %i% gtr 1 echo %* >> %file%.new
goto :eof
:end
ren %file% %file%.bak
ren %file%.new %file%
del %file%.bak
Exit
endloca
Antworten