Changeset 19290
- Timestamp:
- 2009-04-29T19:18:45+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/gsicontrol.bat
r19288 r19290 112 112 echo Configuring admin user password: 113 113 for /F %%T in ('getpw') do set encrypted_password=%%T 114 rem echo %encrypted_password% 114 115 :: Have to create an intermediate file in the following, because echoing 116 :: lines straight into a pipe adds spaces before the end of each line. 117 :: When piping need to double escape angle brackets with three hat signs, 118 :: but when redirecting to a file, need to escape only once (one hat sign). 115 119 if ERRORLEVEL 0 ( 116 120 ( 117 121 echo [admin] 118 echo ^^^<enabled^^^>true 119 echo ^^^<groups^^^>administrator,colbuilder,all-collections-editor 120 echo ^^^<password^^^>%encrypted_password% 121 echo ^^^<username^^^>admin 122 )|txt2db -append "%GSDLHOME%\etc\users.gdb" 122 echo ^<enabled^>true 123 echo ^<groups^>administrator,colbuilder,all-collections-editor 124 echo ^<password^>%encrypted_password% 125 echo ^<username^>admin 126 ) > "%GSDLHOME%\etc\users.txt" 127 type "%GSDLHOME%\etc\users.txt" | txt2db -append "%GSDLHOME%\etc\users.gdb" 128 del "%GSDLHOME%\etc\users.txt" 123 129 ) else ( 124 130 echo Did not set password
Note:
See TracChangeset
for help on using the changeset viewer.