How do you connect and disconnect from the wireless network? Perhaps just insert the commands into your scripts for this.
When I manually suspend and resume I call self-made scripts containing "cardctl suspend", "cardctl resume", "cardctl insert" and "cardctl eject" commands and it would be no problem to also include the appropriate samba stop and start sequences.
However, when I plug in the WiFi card my C3000 automatically connects the card and I don't need to call one of my scripts. Also when suspending and resuming the whole Zaurus the WiFi stuff is automatically executed w/o the need to call my scripts. In these cases the samba server is not correctly stopped and started.
So I thought there must be some system scripts which are automatically called by some mechanism. Is it hotplug? Dunno. I've not yet looked into the inner workings of hotplug and what scripts are involved.
Can somebody confirm whether it is hotplug doing this "magic stuff"?