if [ -x /sbin/service ]; then
$_nice /sbin/service "$_service_name" "$_op"
- elif [ -x /usr/sbin/service ]; then
- $_nice /usr/sbin/service "$_service_name" "$_op"
elif [ -x $CTDB_ETCDIR/init.d/$_service_name ]; then
$_nice $CTDB_ETCDIR/init.d/$_service_name "$_op"
elif [ -x $CTDB_ETCDIR/rc.d/init.d/$_service_name ]; then
This might actually be a problem with the samba init script, but smbd and nmbd seem to be controled by upstart and the scripts in /etc/init.d don't actually do anything. Maybe /etc/init.d/samba is being phased out and the services are managed directly, which seems to work here:
I was able to make some tweaks and get it running for Samba. Looks like these could also apply to upstream Debian.
The service command is in a different path:
root@san1: /etc/ctdb# diff -u functions functions.orig
--- functions 2014-12-19 11:24:12.660339600 -0500
+++ functions.orig 2014-12-19 10:53:29.247030923 -0500
@@ -161,8 +161,6 @@
if [ -x /sbin/service ]; then init.d/ $_service_ name ]; then init.d/ $_service_ name "$_op" rc.d/init. d/$_service_ name ]; then
$_nice /sbin/service "$_service_name" "$_op"
- elif [ -x /usr/sbin/service ]; then
- $_nice /usr/sbin/service "$_service_name" "$_op"
elif [ -x $CTDB_ETCDIR/
$_nice $CTDB_ETCDIR/
elif [ -x $CTDB_ETCDIR/
This might actually be a problem with the samba init script, but smbd and nmbd seem to be controled by upstart and the scripts in /etc/init.d don't actually do anything. Maybe /etc/init.d/samba is being phased out and the services are managed directly, which seems to work here:
root@san1: /etc/ctdb/ events. d# diff -u 50.samba ~/50.samba.orig SERVICE_ NMB=${CTDB_ SERVICE_ NMB:-nmb} SMB=${CTDB_ SERVICE_ SMB:-smbd} NMB=${CTDB_ SERVICE_ NMB:-nmbd} SMB=${CTDB_ SERVICE_ SMB:-samba} NMB=${CTDB_ SERVICE_ NMB:-"" }
--- 50.samba 2014-12-19 11:22:05.522193976 -0500
+++ /root/50.samba.orig 2014-12-19 11:21:46.602468765 -0500
@@ -14,8 +14,8 @@
CTDB_
;;
debian)
- CTDB_SERVICE_
- CTDB_SERVICE_
+ CTDB_SERVICE_
+ CTDB_SERVICE_
;;
*)
# Use redhat style as default:
root@san1: /etc/ctdb/ events. d# ctdb status 330683100
Number of nodes:2
pnn:0 10.10.1.21 OK (THIS NODE)
pnn:1 10.10.1.22 UNHEALTHY
Generation:
Size:2
hash:0 lmaster:0
hash:1 lmaster:1
Recovery mode:NORMAL (0)
Recovery master:1