Changeset 302


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

GUI tools: Add free space check on TMPDIR

Location:
branches/guitools-1.0
Files:
17 edited

Legend:

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

    r269 r302  
    2727    end   
    2828    TempDir       = strip(TempDir,'T','\')||'\' /* make sure there is trailing "\" */
     29
    2930    IF options.!debug == 1 THEN say '_InitTempDir() done, will use "'TempDir'"'
    3031return
     32
     33_ChkTempFreeSpace:
     34    IF options.!debug == 1 THEN say '_ChkTempFreeSpace() started'
     35    /* Check free space */
     36    TempDrvInfo   = SysDriveInfo(left(TempDir,2))
     37    parse var TempDrvInfo . TempFreeSpace . .
     38    if TempFreeSpace < 1048576 then do
     39        say 'Warning: Free space on "'||TempDir||'" low!'
     40    end
     41    drop TempDrvInfo
     42    IF options.!debug == 1 THEN say '_ChkTempFreeSpace() done, got "'TempFreeSpace'"'
     43return TempFreeSpace
  • 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 */
  • branches/guitools-1.0/smbmon/changes

    r295 r302  
    22                        WIP: Add findsmb functionality
    33Version 0.9.25 27-06-2009
     4                        +Added: Check free space on TMPDIR
    45                        +Added: _SambaInit: Fallback also for helpfile only
    56                        +Added: Beep if number of smbd.exe increases (in debug
  • branches/guitools-1.0/smbmon/smbmon.vrp

    r295 r302  
    77VRXWindow: __VREMainWindow,1,2180,3710,940,8000
    88VRXWindow: __VRESectionListWindow,1,2650,12093,9359,3300
    9 VRXWindow: __VREToolsWindow,1,2204,1590,7495,1659
     9VRXWindow: __VREToolsWindow,1,2204,1590,7498,1661
    1010VRXWindow: __VREWindListWindow,1,265,12093,2650,3150
    1111UserFile: 1
  • branches/guitools-1.0/smbmon/smbmon.vrx

    r294 r302  
    253253    call _INILayoutRead "CN_Daemons"
    254254
     255    if _ChkTempFreeSpace() < 262144 then do
     256        Msg.Type = "W"
     257        Msg.Text = NLVGetMessage(116, TempDir)
     258        call _ShowMsg
     259    end
     260
    255261    call Main_Resize
    256262
     263   
    257264    ok = VRSet("Main", "Visible", 1)
    258265    say '_GUIInit() done'
  • branches/guitools-1.0/smbmon/smbmon_de.mkm

    r288 r302  
    125125SMM0114I: Gruppenzuordnung fr "%1" existiert bereits.
    126126SMM0115I: Den UID als GID zu benutzen ist nicht empfehlenswert. Trotzdem weitermachen?
    127 SMM0116?:
     127SMM0116I: Zuwenig freier Platz auf "%1"!
    128128SMM0117?:
    129129SMM0118I: Detailansicht
  • branches/guitools-1.0/smbmon/smbmon_en.mkm

    r288 r302  
    125125SMM0114I: Group mpapping for "%1" already exists.
    126126SMM0115I: Using UID as GID is not recommended, continue anyway?
    127 SMM0116?:
     127SMM0116I: Free space on "%1" low!
    128128SMM0117?:
    129129SMM0118I: Details
  • branches/guitools-1.0/smbmon/smbmon_fr.mkm

    r288 r302  
    130130 !
    131131SMM0115I: L'utilisation d'un UID comme GID n'est pas recommand‚e. Voulez-vous continuer ?
    132 SMM0116?:
     132SMM0116?: D'espace libre sur "%1" est faible !
    133133SMM0117?:
    134134SMM0118I: D‚tails
  • branches/guitools-1.0/smbmon/smbmon_sv.mkm

    r288 r302  
    125125SMM0114I: Alias f”r gruppen "%1" finns redan!
    126126SMM0115I: Att anv„nda UID som GID rekommenderas inte. Vill du trots allt forts„tta?
    127 SMM0116?:
     127SMM0116I: Fritt utrymme p† "%1" „r l†g!
    128128SMM0117?:
    129129SMM0118I: Detaljvy
  • branches/guitools-1.0/smbusers/changes

    r287 r302  
     1Version 0.9.2 14-07-2009
     2                         +Added: Free space check on temporary directory
    13Version 0.9.1 19-06-2009
    24                         +Added: SambaInit.VRS: _SambaSearchPathExtend added
  • branches/guitools-1.0/smbusers/smbusers.VRP

    r287 r302  
    77VRXWindow: __VREMainWindow,1,2180,3710,891,8000
    88VRXWindow: __VRESectionListWindow,1,2951,11130,8949,3342
    9 VRXWindow: __VREToolsWindow,1,2457,1012,7498,1661
     9VRXWindow: __VREToolsWindow,1,2457,1012,7492,1665
    1010VRXWindow: __VREWindListWindow,1,446,11130,2650,3150
    1111UserFile: 1
  • branches/guitools-1.0/smbusers/smbusers.VRX

    r287 r302  
    453453    call _INILayoutRead "CN_Users"
    454454    call _INILayoutRead "CN_Groups"
     455
     456    if _ChkTempFreeSpace() < 262144 then do
     457        Msg.Type = "W"
     458        Msg.Text = NLVGetMessage(180, TempDir)
     459        call _ShowMsg
     460    end
    455461
    456462    ok = VRSet("Main", "Visible", 1)
  • branches/guitools-1.0/smbusers/smbusers_de.mkm

    r287 r302  
    195195SMU0174I: Alle zurcksetzen
    196196SMU0175I: Žnderung speichern
     197SMU0176?:
     198SMU0177?:
     199SMU0178?:
     200SMU0179?:
     201; More error messages
     202SMU0180I: Zuwenig freier Platz auf "%1"!
  • branches/guitools-1.0/smbusers/smbusers_en.mkm

    r287 r302  
    194194SMU0174I: Reset policies
    195195SMU0175I: Update
     196SMU0176?:
     197SMU0177?:
     198SMU0178?:
     199SMU0179?:
     200; More error messages
     201SMU0180I: Free space low on "%1"!
  • branches/guitools-1.0/smbusers/smbusers_fr.mkm

    r287 r302  
    210210SMU0175I: Mettre
    211211 jour
     212SMU0176?:
     213SMU0177?:
     214SMU0178?:
     215SMU0179?:
     216; More error messages
     217SMU0180I: D'espace libre sur "%1" est faible !
  • branches/guitools-1.0/smbusers/smbusers_sv.mkm

    r287 r302  
    195195SMU0174I: terst„ll policy
    196196SMU0175I: Uppdatera
     197SMU0176?:
     198SMU0177?:
     199SMU0178?:
     200SMU0179?:
     201; More error messages
     202SMU0180I: Fritt utrymme p† "%1" „r l†g!
Note: See TracChangeset for help on using the changeset viewer.