Ignore:
Timestamp:
Jul 14, 2009, 10:36:39 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

GUI tools: Add free space check on TMPDIR

File:
1 edited

Legend:

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

    r300 r302  
    7171    end
    7272
    73     if samba.!smbd = "" then call _ErrorBinaryNotFound " could not find smbd.exe!"
     73    if samba.!smbd = "" then call _ErrorBinaryNotFound "Could not find smbd.exe!"
    7474
    7575    samba.!bin = VRParseFileName(samba.!smbd,'DP')
     
    8080    if \VRFileExists(samba.!smbcmd) then do
    8181        samba.!smbcmd = samba.!bin'\smb.cmd'
    82         if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound " could not find smb.cmd!"
     82        if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound "Could not find smb.cmd!"
    8383    end
    8484    IF options.!debug == 1 THEN say '  smb.cmd        = "'samba.!smbcmd'"'
     
    8686    /* smbpasswd.exe */
    8787    samba.!smbpasswdexe = samba.!bin'\smbpasswd.exe'
    88     if \VRFileExists(samba.!smbpasswdexe) then call _ErrorBinaryNotFound " could not find smbpasswd.exe!"
     88    if \VRFileExists(samba.!smbpasswdexe) then call _ErrorBinaryNotFound "Could not find smbpasswd.exe!"
    8989    IF options.!debug == 1 THEN say '  smbpasswd.exe  = "'samba.!smbpasswdexe'"'
    9090
    9191    /* pdbedit.exe */
    9292    samba.!pdbeditexe = samba.!bin'\pdbedit.exe'
    93     if \VRFileExists(samba.!pdbeditexe) then call _ErrorBinaryNotFound " could not find pdbedit.exe!"
     93    if \VRFileExists(samba.!pdbeditexe) then call _ErrorBinaryNotFound "Could not find pdbedit.exe!"
    9494    IF options.!debug == 1 THEN say '  pdbedit.exe    = "'samba.!pdbeditexe'"'
    9595
    9696    /* net.exe */
    9797    samba.!netexe = samba.!bin'\net.exe'
    98     if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound " could not find net.exe!"
     98    if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound "Could not find net.exe!"
    9999    IF options.!debug == 1 THEN say '  net.exe        = "'samba.!netexe'"'
    100100
    101101    /* testparm.exe */
    102102    samba.!testparmexe = samba.!bin'\testparm.exe'
    103     if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound " could not find testparm.exe!"
     103    if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound "Could not find testparm.exe!"
    104104    IF options.!debug == 1 THEN say '  testparm.exe   = "'samba.!testparmexe'"'
    105105
    106106    /* smbtree.exe */
    107107    samba.!smbtreeexe = samba.!bin'\smbtree.exe'
    108     if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound " could not find smbtree.exe!"
     108    if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound "Could not find smbtree.exe!"
    109109    IF options.!debug == 1 THEN say '  smbtree.exe    = "'samba.!smbtreeexe'"'
    110110
    111111    /* smbstatus.exe */
    112112    samba.!smbstatusexe = samba.!bin'\smbstatus.exe'
    113     if \VRFileExists(samba.!smbstatusexe) then call _ErrorBinaryNotFound " could not find smbstatus.exe!"
     113    if \VRFileExists(samba.!smbstatusexe) then call _ErrorBinaryNotFound "Could not find smbstatus.exe!"
    114114    IF options.!debug == 1 THEN say '  smbstatus.exe  = "'samba.!smbstatusexe'"'
    115115
    116116    /* smbcontrol.exe */
    117117    samba.!smbcontrolexe = samba.!bin'\smbcontrol.exe'
    118     if \VRFileExists(samba.!smbcontrolexe) then call _ErrorBinaryNotFound " could not find smbcontrol.exe!"
     118    if \VRFileExists(samba.!smbcontrolexe) then call _ErrorBinaryNotFound "Could not find smbcontrol.exe!"
    119119    IF options.!debug == 1 THEN say '  smbcontrol.exe = "'samba.!smbcontrolexe'"'
    120120
    121121    /* smbclient.exe */
    122122    samba.!smbclientexe = samba.!bin'\smbclient.exe'
    123     if \VRFileExists(samba.!smbclientexe) then call _ErrorBinaryNotFound " could not find smbclient.exe!"
     123    if \VRFileExists(samba.!smbclientexe) then call _ErrorBinaryNotFound "Could not find smbclient.exe!"
    124124    IF options.!debug == 1 THEN say '  smbclient.exe  = "'samba.!smbclientexe'"'
    125125
     
    146146    end
    147147
    148     if samba.!pwd_mkdb = "" then call _ErrorBinaryNotFound " could not find pwd_mkdb.exe!"
     148    if samba.!pwd_mkdb = "" then call _ErrorBinaryNotFound "Could not find pwd_mkdb.exe!"
    149149    IF options.!debug == 1 THEN say '  pwd_mkdb.exe   = "'samba.!pwd_mkdb'"'
    150150
     
    163163    end
    164164
    165     if samba.!log = "" then call _ErrorDataFileNotFound " could not find logfiles!"
     165    if samba.!log = "" then call _ErrorDataFileNotFound "Could not find logfiles!"
    166166    IF options.!debug == 1 THEN say '  Samba logfiles = "'samba.!log'"'
    167167
     
    175175    /* the password files - we'll create them if they don't exist */
    176176    samba.!masterpasswd = unixetc'\master.passwd'
    177     if \VRFileExists(samba.!masterpasswd) then call _ErrorDataFileNotFound " could not find master.passwd!"
     177    if \VRFileExists(samba.!masterpasswd) then call _ErrorDataFileNotFound "Could not find master.passwd!"
    178178    IF options.!debug == 1 THEN say '  master.passwd  = "'samba.!masterpasswd'"'
    179179
    180180    samba.!pwddb = unixetc'\pwd.db'
    181     if \VRFileExists(samba.!pwddb) then call _ErrorDataFileNotFound " could not find pwd.db!"
     181    if \VRFileExists(samba.!pwddb) then call _ErrorDataFileNotFound "Could not find pwd.db!"
    182182    IF options.!debug == 1 THEN say '  pwd.db         = "'samba.!pwddb'"'
    183183
    184184    samba.!spwddb = unixetc'\spwd.db'
    185     if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound " could not find spwd.db!"
     185    if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound "Could not find spwd.db!"
    186186    IF options.!debug == 1 THEN say '  spwd.db        = "'samba.!spwddb'"'
    187187
    188188    samba.!group = unixetc'\group'
    189     if \VRFileExists(samba.!group) then call _ErrorDataFileNotFound " could not find "samba.!group"!"
     189    if \VRFileExists(samba.!group) then call _ErrorDataFileNotFound "Could not find "samba.!group"!"
    190190    IF options.!debug == 1 THEN say '  group          = "'samba.!group'"'
    191191
    192192    samba.!printcap = unixetc'\printcap'
    193     if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound " could not find printcap!"
     193    if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound "Could not find printcap!"
    194194    IF options.!debug == 1 THEN say '  printcap       = "'samba.!printcap'"'
    195195
     
    210210    /* Check if winbindd daemon exists */
    211211    HaveWinbindd = (stream(samba.!bin'\winbindd.exe', 'c', 'query exists') <> "")
     212
     213    /* Do we have a minimum of free temporary space? */
     214    if _ChkTempFreeSpace < 262144 then call _ErrorDataFileNotFound 'Free space on "'TempDir'" exhausted!'
    212215
    213216    /* Messages from Samba will go here */
Note: See TracChangeset for help on using the changeset viewer.