- Timestamp:
- Jun 18, 2009, 10:45:43 AM (16 years ago)
- Location:
- branches/guitools-1.0/shared
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-1.0/shared/sambainit.vrs
r275 r277 10 10 11 11 /* Error status and file variables */ 12 ErrorFile = Tempdir'smbutil.error'13 12 ErrorState = 0 /* _ErrorBinaryNotFound() changes this variable */ 14 13 DataErrorState = 0 /* _ErrorDataFileNotFound() changes this variable */ … … 27 26 IF options.!debug == 1 THEN say ' UnixRoot = "'UnixRoot'"' 28 27 29 /* if kLIBCPathrewriterInstalled() then do30 unixetc = kLIBCpathRewriter("/etc")31 end32 else */33 28 unixetc = UnixRoot'\etc' 34 29 IF options.!debug == 1 THEN say ' Unixetc = "'unixetc'"' 35 30 36 /* Samba needs TMPDIR for several purposes - if it is absent Samba crashes */ 37 if translate(value('TMPDIR',,'OS2ENVIRONMENT'),'\','/') = '' then do 38 Msg.Title = VRGet("Main", "Caption") 39 Msg.Text = "Environment variable TMPDIR is missing - expect to see Samba crashes!" 40 Msg.Type = "E" 41 call _ShowMsg 42 end 43 44 /* find all executables */ 45 46 /* get the path to this file */ 31 /* Find all executables */ 32 33 /* Get the path to this file */ 47 34 samba.!tools = VRParseFilename(VRGet("Application", "Program"),'DP') 48 35 if samba.!tools = '' then do … … 185 172 186 173 /* find all datafiles - their locations are fixed */ 174 187 175 /* the password files - we'll create them if they don't exist */ 188 176 samba.!masterpasswd = unixetc'\master.passwd' … … 225 213 samba.!error = SysTempFileName(TempDir'smb_err.???') 226 214 samba.!msg = SysTempFileName(TempDir'smb_msg.???') 215 /* Use of this file is deprecated */ 216 ErrorFile = Tempdir'smbutil.error' 227 217 228 218 IF options.!debug == 1 then do … … 260 250 261 251 /*:VRX */ 262 _SambaRunning: procedure expose running. pids. TempDir HaveWinbindd 252 _SambaExtendSearchPath: 253 IF options.!debug == 1 THEN say '_SambaExtendSearchPath() started' 254 /* Add binary and tools path to the PATH variable */ 255 old_path = value('PATH',, 'OS2ENVIRONMENT') 256 if pos(translate(samba.!bin';'),translate(old_path)) = 0 then do 257 if samba.!bin = samba.!tools then new_path = samba.!bin';' 258 else new_path = samba.!bin';'samba.!tools';' 259 ok = value('PATH', new_path || old_path, 'OS2ENVIRONMENT') 260 drop new_path 261 end 262 drop old_path 263 264 /* Add binary and tools path to the BEGINLIBPATH variable */ 265 old_beginlibpath = SysQueryExtLibPath("B") 266 if pos(translate(samba.!bin';'),translate(old_beginlibpath)) = 0 then do 267 if samba.!bin = samba.!tools then new_beginlibpath = samba.!bin';'old_beginlibpath 268 else new_beginlibpath = samba.!bin';'samba.!tools';'old_beginlibpath 269 ok = SysSetExtLibPath( new_beginlibpath, "B") 270 drop new_beginlibpath 271 end 272 drop old_beginlibpath 273 IF options.!debug == 1 THEN say '_SambaExtendSearchPath() done' 274 return 275 276 /*:VRX */ 277 _SambaRunning: procedure expose running. pids. TempDir HaveWinbindd options. 278 IF options.!debug == 1 THEN say '_SambaRunning() started' 279 263 280 /* Checks whether any Samba daemon is currently running */ 264 281 … … 301 318 runres = (running.!smbd | running.!nmbd |running.!winb) 302 319 end 320 IF options.!debug == 1 THEN say '_SambaRunning() done' 303 321 return runres 322 323 /*:VRX */ 324 _PasswordDbRewrite: 325 IF options.!debug == 1 THEN say "_PasswordDBRewrite() started" 326 327 /* Reset any old rc from pwd_mkdb.exe */ 328 pwd_mkdbrc = 0 329 330 /* delete old .db.tmp files */ 331 ok = SysFileDelete(UnixETC'\pwd.db.tmp') 332 ok = SysFileDelete(UnixETC'\spwd.db.tmp') 333 334 /* create backups of old .db files */ 335 ok = VRCopyFile( UnixETC'\pwd.db', UnixETC'\pwd.db.bak' ) 336 ok = VRCopyFile( UnixETC'\spwd.db', UnixETC'\spwd.db.bak' ) 337 338 /* delete old .db files */ 339 ok = SysFileDelete(UnixETC'\pwd.db') 340 ok = SysFileDelete(UnixETC'\spwd.db') 341 342 /* Create new password db */ 343 address cmd samba.!pwd_mkdb' -d 'unixetc' 'samba.!masterpasswd' 2>'samba.!error 344 pwd_mkdbrc = rc 345 if \VRFileExists(samba.!pwddb) | pwd_mkdbrc <> 0 then do 346 call _SambaShowError 347 end 348 IF options.!debug == 1 THEN say "_PasswordDBRewrite() done ("pwd_mkdbrc")" 349 return -
branches/guitools-1.0/shared/swat.vrs
r269 r277 2 2 */ 3 3 _FindHtpasswd: 4 IF options.!debug == 1 THEN say '_FindHtpasswd() started' 4 5 /* htpasswd.exe - required for SWAT but not really part of Samba */ 5 6 samba.!htpasswdexe = "" … … 59 60 swatusers = ETC'\samba\private\swatusers' 60 61 end 62 IF options.!debug == 1 THEN say '_FindHtpasswd() done' 61 63 return
Note:
See TracChangeset
for help on using the changeset viewer.