Opened 11 years ago
Closed 11 years ago
#235 closed defect (fixed)
Wait for network interfaces when starting samba daemons
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Unknown | Version: | |
Keywords: | Cc: |
Description
If one wishes to launch the samba server at machine startup he usually adds the "smb.cmd start" object to his Startup folder. However, once done, the server will sometimes fail to start with NMBD.EXE complaining in logs about being unable to find a subnet to attach to or something like that.
On my machine it happens quite often. The reason for that is that my network interface is configured via DHCP in background and sometimes this process is not yet finished when Startup items are executed. In the latest eCS 2.2 Beta II release the problem is even more noticeable since the "dhcpstrt" command used to configure "lan0" specifies the zero wait delay (-d 0) by default. it used to be something like -d 45 in the previous releases which caused the whole boot process to pause until "lan0" is configured. Looks like they changed it to 0 to remove this boot delay and this brings us problems with starting Samba.
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | b4smb.diff added |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Made the DHCP stuff a configuriable option (enabled by default) in b4smb.cmd - it just inserts a 15 seconds break if the interfaces are configured manually.
Fixed in changeset #844
One of the solutions to this problem is to use "dhcpstrt" w/o arguments in the b4smb.cmd Samba script which contains tasks performed before starting daemons. From my experience, "dhcpstrt" started w/o arguments just waits until the background task (started by its another invocation from "\MPTN\bin\setup.cmd" during boot) finishes its job. I'm attaching the diff here.
However, I have a concern if this solution is an universal one as I don't know what "dhcpstrt" will do if the network interfaces are configured manually. Perhaps the "inetwait" commands should be used in such cases but this needs to be checked. Perhaps, the best way to do this is to analyze the contents of "\MPTN\bin\setup.cmd" in b4smb.cmd and take an appropriate action based on how the network interfaces are configured — through DHCP or manually.