Albrecht Schlosser wrote:
Hi,

here are some minor problems I found with Samba startup and shutdown, using Samba 2.2.8, release 2004-1021 with "SAMBA_SHUTDOWN.COM by R. Regier 15-Sep-04":

(1) The shutdown procedure disables the services SMBD and SWAT. This is useful (only) if you want to (temporary) disable the service(s) on a running system and start them later again. The unmodified procedure SAMBA_STARTUP.COM does not enable the service, because they should be enabled by the TCPIP startup procedure. However, this is not true, if you run SAMBA_SHUTDOWN.COM for any reason and want to start the service again with SAMBA_STARTUP.COM.

I'm not sure what would be the best solution, but for now I decided to uncomment the "enable service" commands in the startup procedure. Maybe it would be a good idea to add SAMBA_STOP.COM and SAMBA_START.COM (or similar) to stop and start Samba temporarily ...

Uncommenting the "enable service" commands is probably the best solution.

Note that until something like the SAMBA_STARTUP.COM procedure makes the SAMBA_ROOT logical name available, TCPIP services can not enable the SMBD and SWAT processes.

So unless you have the "enable service" commands or something else defining the SAMBA_ROOT logical, after a reboot, SMBD and SWAT will not start.

(2) One bigger problem with this release (and previous 2.2.8 releases) is the fact that the NMBD process creates the file "samba_root:[var.locks]nmbd.pid" and checks this file when started. NMBD exits with the following error message in the file "SAMBA_ROOT:[VAR]LOG.NMBD":

That is also a problem with SMBD. The solution that I did with the 2.0.6 release was change the code to not create a PID file at all.



My solution is to add these lines to SAMBA_SHUTDOWN.COM:


$ SECTION3: $! $! delete obsolete .PID file ... $! $ if f$search("samba_root:[var.locks]nmbd.pid").nes. "" then - delete/log/noconf samba_root:[var.locks]nmbd.pid;* $! $ ECHO "[ Finished NMBD process termination ]"

A similar check is needed for SMBD.PID.

The PID file stuff can also be an issue in a cluster with a common SAMBA_ROOT:


(the first and last lines are from the original procedure).

Is there a way to stop NMBD in a "safe" way that it can delete the .PID file? If not, then I think that the check should not be done (under VMS). Setting the process name to "NMBD" is safe enough if the UIC group of the NMBD process is known.

Using the SYS$FORCEX procedure may do it. Or may be configured to be able to do that.


But the PID file concept is useless on OpenVMS.

If you want to make sure that only one copy of a program is running on a single node or a cluster, the SYS$ENQW call is the only way to reliably do this.

-John
[EMAIL PROTECTED]
Personal Opinion Only

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to