Author: arkurth
Date: Tue Jul 18 21:18:30 2017
New Revision: 1802340

URL: http://svn.apache.org/viewvc?rev=1802340&view=rev
Log:
VCL-867
Fixed problem in update_cygwin.cmd introduced for some versions of Cygwin in 
r1801224. "localhost" was added after the "-l" in the mkgroup.exe and 
mkpassword.exe commands. This worked on the versions of Cygwin tested. On some 
other versions, however, this generates an error:
/usr/bin/mkpasswd: A domain name is only accepted when '-d' is given.

Updated the commands to first try "-l localhost" and added logical or to then 
try "-l" if an error occurs.

Modified:
    vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd

Modified: vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd
URL: 
http://svn.apache.org/viewvc/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd?rev=1802340&r1=1802339&r2=1802340&view=diff
==============================================================================
--- vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd (original)
+++ vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd Tue Jul 18 
21:18:30 2017
@@ -64,13 +64,13 @@ echo ERRORLEVEL: %ERRORLEVEL%
 echo.
 
 echo %TIME%: Creating new "group" file...
-C:\Cygwin\bin\mkgroup.exe -l localhost > C:\Cygwin\etc\group
+C:\Cygwin\bin\mkgroup.exe -l localhost || C:\Cygwin\bin\mkgroup.exe -l > 
C:\Cygwin\etc\group
 echo ERRORLEVEL: %ERRORLEVEL%
 set /A STATUS+=%ERRORLEVEL%
 echo.
 
 echo %TIME%: Creating new "passwd" file and changing root's primary group from 
'None' to 'None'
-C:\Cygwin\bin\mkpasswd.exe -l localhost | C:\Cygwin\bin\sed.exe -e 
's/\(^root.*:\)513\(:.*\)/\1544\2/' > C:\Cygwin\etc\passwd
+C:\Cygwin\bin\mkpasswd.exe -l localhost || C:\Cygwin\bin\mkpasswd.exe -l | 
C:\Cygwin\bin\sed.exe -e 's/\(^root.*:\)513\(:.*\)/\1544\2/' > 
C:\Cygwin\etc\passwd
 echo ERRORLEVEL: %ERRORLEVEL%
 set /A STATUS+=%ERRORLEVEL%
 echo.


Reply via email to