Ignore:
Timestamp:
May 25, 2010, 6:17:14 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: SSCC 1.0.0, SMBUsers 0.9.8 several fixes, rest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/guitools-1.0/shared/sambainit.vrs

    r408 r451  
    4242    /* smbd.exe */
    4343    samba.!smbd = ""
     44    if samba.!smbd = "" then do /* USER\Samba\ServerPath */
     45        call charout , "  Is Samba ServerPath stored in OS2.INI? "
     46        samba.!bin = strip(VRGetIni( "Samba", "ServerPath2", "USER" ),'T','00'x)
     47        if samba.!bin <> "" then do
     48            say 'Yes, found "'samba.!bin'"'
     49            if VRFileExists(samba.!bin"\smbd.exe") then do
     50                samba.!smbd = samba.!bin"\smbd.exe"
     51                say '  Found "'samba.!smbd'".'
     52            end
     53        end
     54        else say 'No, possibly manual installation.'
     55    end
     56    if samba.!smbd = "" then do /* wellknown locations */
     57        WellKnown = SysBootdrive()"\ecs\system\samba;"SysBootdrive()"\samba"
     58        Programs = value("PROGRAMS",,'OS2ENVIRONMENT')
     59        if Programs <> "" then WellKnown = Wellknown';'Programs'\samba'
     60        Tools = value("TOOLS",,'OS2ENVIRONMENT')
     61        if Tools <> "" then WellKnown = Wellknown';'Tools'\samba'
     62        call charout , "  Are binaries in wellknown locations? "
     63        ok = VRFindFile("smbd.exe",WellKnown)
     64        if ok <> "" then say "Yes."; else say "No."
     65        if ok <> "" then samba.!smbd = ok
     66        drop Wellknown Tools Programs
     67    end
    4468    if samba.!smbd = "" then do /* in current directory? */
    4569        call charout , "  Are binaries in current directory? "
    4670        ok = SysFileTree('.\smbd.exe', exist.,'FO')
    47         say exist.0' (1 = Yes, 0 = No)'
     71        if exist.0 = 1 then say "Yes."; else say "No."
    4872        if exist.0 = 1 then samba.!smbd = exist.1
    4973    end
     
    5175        call charout , "  Are binaries in parent directory? "
    5276        ok = SysFileTree('..\smbd.exe', exist.,'FO')
    53         say exist.0' (1 = Yes, 0 = No)'
     77        if exist.0 = 1 then say "Yes."; else say "No."
    5478        if exist.0 = 1 then samba.!smbd = exist.1
    5579    end
     
    5781        call charout , "  Are binaries in ..\BIN directory? "
    5882        ok = SysFileTree('..\bin\smbd.exe', exist.,'FO')
    59         say exist.0' (1 = Yes, 0 = No)'
     83        if exist.0 = 1 then say "Yes."; else say "No."
    6084        if exist.0 = 1 then samba.!smbd = exist.1
    6185    end
     
    7397    if samba.!smbd = "" then call _ErrorBinaryNotFound 'Could not find smbd.exe!'
    7498
     99
    75100    samba.!bin = VRParseFileName(samba.!smbd,'DP')
    76101    IF options.!debug == 1 THEN say '  Samba binaries = "'samba.!bin'"'
     102    IF options.!debug == 1 THEN say '  Samba smbd.exe = "'samba.!smbd'"'
    77103
    78104    /* smb.cmd */
     
    299325
    300326/*:VRX */
    301 _SambaRunning: procedure expose running. pids. TempDir HaveWinbindd options.
     327_SambaRunning: procedure expose running. pids. TempDir HaveWinbindd options. samba.
    302328    IF options.!debug == 1 THEN say '_SambaRunning() started'
    303329
Note: See TracChangeset for help on using the changeset viewer.