Ignore:
Timestamp:
Jun 24, 2009, 2:42:01 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

smb.cmd: Check if master.passwd exists, give hints in case of error

Location:
branches/scripts/smb_init
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/scripts/smb_init/readme.smb_init

    r251 r283  
    1 Samba Server for eCS (OS/2) init script Version 3.0.3
     1Samba Server for eCS (OS/2) init script Version 3.1.0
    22=====================================================
    33
     
    2626smb {start|stop|restart|reload|status|test}
    2727
    28 In addition a plugin feature found in IBM's TCPSTART.CMD is present in
    29 smb.cmd:
     28In addition a similar plugin feature found in IBM's TCPSTART.CMD is present
     29in smb.cmd:
    3030
    3131- If a file named B4SMB.CMD is found in the Samba directory, it will be run
     
    3535  after the Samba services have been stopped.
    3636
    37 smb.cmd is also used by SWAT and smbmon.exe to start or stop the Samba daemons
     37smb.cmd is also used by SWAT and smbmon.exe to start or stop the Samba daemons.
    3838
    3939In addition Samba daemons that refuse to stop peacefully are killed using
  • branches/scripts/smb_init/smb.cmd

    r268 r283  
    1 /* Samba Server for eCS (OS/2) init script Version 3.0.4
     1/* Samba Server for eCS (OS/2) init script Version 3.1.0
    22   Copyright (C) netlabs.org 2007-2009
    33
     
    6060            say 'Samba services are not running. Aborting...'
    6161            ok = directory(OldDir)
    62             exit -3
     62            exit -4
    6363        end
    6464        samba.!bin'\smbstatus.exe smbd 2>NUL'
     
    156156    end
    157157    UnixETC  = UnixRoot'\etc'
     158    /* Make sure it exists */
     159    ok = SysMkDir(UnixETC)
    158160
    159161    /* Find out various directories */
     
    198200    samba.!smbconf = stream(ETC'\samba\smb.conf','c','query exists')
    199201    if samba.!smbconf = "" then do
    200         say ETC'\samba\smb.conf is missing. Aborting...'
     202        say ETC'\samba\smb.conf is missing.'
     203        say 'Try running sscc.exe /install to create it! Aborting...'
    201204        exit -2
     205    end
     206
     207    /* Check if kLIBC password files exist */
     208    samba.!masterpasswd = stream(unixetc'\master.passwd','c','query exists')
     209    if samba.!masterpasswd = "" then do
     210        say unixetc'\master.passwd is missing.'
     211        say 'Try running sscc.exe /install to create it! Aborting...'
     212        exit -3
     213    end
     214
     215    samba.!pwddb = stream(unixetc'\pwd.db','c','query exists')
     216    if samba.!pwddb = "" then do
     217        say unixetc'\pwd.db is missing.'
     218        say 'Try running usermod to create it. Aborting...'
     219        exit -3
     220    end
     221
     222    samba.!spwddb = stream(unixetc'\spwd.db','c','query exists')
     223    if samba.!spwddb = "" then do
     224        say unixetc'\spwd.db is missing.'
     225        say 'Try running usermod to create it. Aborting...'
     226        exit -3
    202227    end
    203228
     
    257282    samba.!lock_dir   = translate(IniGet("lock directory", "global", samba.!smbconf),'\','/')
    258283    samba.!debuglevel = IniGet("log level", "global", samba.!smbconf)
     284
     285    /* make sure these directories exist */
     286    ok = SysMkDir(samba.!log_path)
     287    ok = SysMkDir(samba.!lock_dir)
    259288   
    260289    ok = value("SMB_LOGS",samba.!log_path,"OS2ENVIRONMENT")
Note: See TracChangeset for help on using the changeset viewer.