First try to map using smb

Fallback to webdav if smb doesn't work
master
Daniel Berteaud 9 years ago
parent 7e88ed95de
commit 1fb7697037
  1. 9
      softwares/FWSUpdates/bin/sync.bat

@ -40,10 +40,15 @@ FOR %%D IN (e f g h i j k l m n o p q r s t u v w x y z) do (
echo %DATE% %TIME% - couldn't find any free drive letter > %SystemDrive%\FWSUpdates\status\sync_log.txt echo %DATE% %TIME% - couldn't find any free drive letter > %SystemDrive%\FWSUpdates\status\sync_log.txt
goto :EOF goto :EOF
:drivefound :drivefound
net use %DRIVE%: %REPO% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL net use %DRIVE%: %REPO_SMB% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL
REM Check if mapping worked REM Check if mapping worked
IF %ERRORLEVEL% NEQ 0 ( IF %ERRORLEVEL% NEQ 0 (
echo %DATE% %TIME% - Error mapping %REPO% >> %SystemDrive%\FWSUpdates\status\sync_log.txt echo %DATE% %TIME% - Error mapping %REPO_SMB%, lets try webdav >> %SystemDrive%\FWSUpdates\status\sync_log.txt
goto cleanup
)
net use %DRIVE%: %REPO_WEB% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL
IF %ERRORLEVEL% NEQ 0 (
echo %DATE% %TIME% - Error mapping %REPO_WEB% >> %SystemDrive%\FWSUpdates\status\sync_log.txt
goto cleanup goto cleanup
) )
REM and if wpkg.js exists REM and if wpkg.js exists

Loading…
Cancel
Save