Changeset 994
- Timestamp:
- Dec 17, 2016, 11:35:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripts/smb_init/b4smb.cmd
r993 r994 11 11 */ 12 12 setupCMD = SysBootDrive()'\MPTN\BIN\Setup.CMD' 13 LANx = 'lan0' /* Check this interface for a fixed IP */14 13 ArchLogs = 1 /* Move previous logfiles to archive (by Yuri Dario) */ 15 14 DelLogs = 0 /* Remove previous logfiles only */ … … 27 26 '@echo off' 28 27 29 do while lines(SetupCMD) > 0 /* Check LANx interfacefor fixed IP address */28 do while lines(SetupCMD) > 0 /* Check interfaces for fixed IP address */ 30 29 SL = translate(linein(SetupCMD)) 31 if word(SL,1) = "IFCONFIG" & word(SL,2) = translate(LANx) then do 30 if word(SL,1) = "IFCONFIG" & word(SL,2) <> "LO" then do 31 IF = word(SL,2) 32 32 IP = word(SL,3) 33 address cmd '@ifconfig ' LANx' | rxqueue'34 if queued() = 2then do33 address cmd '@ifconfig 'IF' | rxqueue' 34 if queued() > 1 then do 35 35 parse pull . 36 parse pull . IPIFC . 37 if IPIFC = IP then DHCPWait = 0 36 parse pull ipline ipc rest 37 if ipc = IP then do 38 DHCPWait = 0 39 say IF': Fixed IP 'IP', valid.' 40 end 38 41 end 42 else say IF': Fixed IP 'IP', invalid.' 39 43 end 44 if word(SL,1) = "DHCPSTRT" then do 45 say "DHCP for "word(SL,3)' not recommended for Samba, waiting...' 46 DHCPWait = 1 47 end 40 48 end 41 49 ok = stream(SetupCMD,'c','close') 50 51 do while queued() > 0 52 parse pull . 53 end 42 54 43 55 if ArchLogs = 1 then do /* Creative logfile archive */
Note:
See TracChangeset
for help on using the changeset viewer.