- Timestamp:
- Dec 16, 2016, 5:59:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripts/smb_init/b4smb.cmd
r897 r993 2 2 Samba Server for eComStation (OS/2) tools 3 3 4 (c) 2007-201 5Herwig Bauernfeind for bww bitwise works GmbH.4 (c) 2007-2016 Herwig Bauernfeind for bww bitwise works GmbH. 5 5 Script: B4SMB.CMD, requires REXX. 6 6 Purpose: This script is executed before the Samba daemons are actually … … 10 10 Syntax: No parameters. 11 11 */ 12 13 ArchLogs = 1 /* Move previous logfiles to archive (by Yuri Dario) */ 14 DelLogs = 0 /* Remove previous logfiles only */ 15 KeepGens = 10 /* Keep last 10 generations of log files, 0 = all */ 16 SaveCfg = 1 /* Save a snapshot of the current Samba configuration */ 17 DelTDBs = 1 /* Remove transient .tdb files */ 18 DHCPWait = 1 /* wait until an address was obtained by the DHCP server */ 12 setupCMD = SysBootDrive()'\MPTN\BIN\Setup.CMD' 13 LANx = 'lan0' /* Check this interface for a fixed IP */ 14 ArchLogs = 1 /* Move previous logfiles to archive (by Yuri Dario) */ 15 DelLogs = 0 /* Remove previous logfiles only */ 16 KeepGens = 10 /* Keep last 10 generations of log files, 0 = all */ 17 SaveCfg = 1 /* Save a snapshot of the current Samba configuration */ 18 DelTDBs = 1 /* Remove transient .tdb files */ 19 DHCPWait = 1 /* wait until an address was obtained by the DHCP server */ 19 20 20 21 /* Setup places */ … … 25 26 26 27 '@echo off' 28 29 do while lines(SetupCMD) > 0 /* Check LANx interface for fixed IP address */ 30 SL = translate(linein(SetupCMD)) 31 if word(SL,1) = "IFCONFIG" & word(SL,2) = translate(LANx) then do 32 IP = word(SL,3) 33 address cmd '@ifconfig 'LANx' | rxqueue' 34 if queued() = 2 then do 35 parse pull . 36 parse pull . IPIFC . 37 if IPIFC = IP then DHCPWait = 0 38 end 39 end 40 end 41 ok = stream(SetupCMD,'c','close') 27 42 28 43 if ArchLogs = 1 then do /* Creative logfile archive */ … … 78 93 ok = SysFileDelete(SMB_LOCK||'\wins.dat') 79 94 /* Do not remove wins.tdb unless it is damaged */ 80 ok = SysFileDelete(SMB_LOCK||'\wins.tdb')95 /* ok = SysFileDelete(SMB_LOCK||'\wins.tdb') */ 81 96 end 82 97
Note:
See TracChangeset
for help on using the changeset viewer.