I just updated Samba from 3.0.24-r3 to 3.0.25c. After doing etc-update, I tried to restart Samba (/etc/init.d/samba restart) and nothing happened. I then tried stop, and start and nothing happened with any one of those two commands (no message, no [ok] or [!!]). Old processes (smbd and nmbd) were still running so I killed them manually. I can start both of the services manually by doing smbd -D and nmbd -D. Reproducible: Always
Try to change code snippet in /etc/init.d/samba: if [[ -n ${DAEMONNAME} ]] ; then daemon_list=${DAEMONNAME} fi to: if [[ -z ${DAEMONNAME} ]] ; then daemon_list=${DAEMONNAME} fi Should resolve problem. Bests, Tom.
Hello Tomasz, you are right that your suggestion fixes the problem. However, it is not the right thing to do. As I understand it, the purpose of the code DAEMONNAME="${SVCNAME##samba.}" if [[ -n ${DAEMONNAME} ]] ; then daemon_list=${DAEMONNAME} fi is to determine if someone wants a specific service to be stopped/started/whatever, i.e., if you link /etc/init.d/samba.smbd --> /etc/init.d/samba and then you call "/etc/init.d/samba.smbd start", DAEMONNAME will be set to "smbd". As DAEMONNAME is not empty now, daemon_list is set to DAEMONNAME, ignoring the value inherited from /etc/conf.d/samba (which typically contains all samba services). The problem is that DAEMONNAME is *not* empty if /etc/init.d/samba is called -- it is the string "samba" instead. So the expression [[ -n ${DAEMONNAME} ]] *always* evaluates to true (as "samba" is not an empty string), and daemon_list is *always* set to "samba". The result is that nothing happens when starting and stopping, as there are no "samba_start" or "samba_stop" variables set in /etc/conf.d/samba. So in my opinion, the correct fix to the problem described would be to replace the expression [[ -n ${DAEMONNAME} ]] by [[ ${DAEMONNAME} != "samba" ]] (By the way, this works for me!) Perhaps there is a possibility to change the bash expression "${SVCNAME##samba.}" such that the result is empty if "samba." is not found as prefix (instead of being the string "samba"), but a quick look into bash's man page did not reveal a solution. However, I'm not a bash expert. Regards, Christoph
sorry, missed that one. Fixed in CVS.