CTDB by default in Debina lenny? (was: [Pkg-samba-maint]
Situation of various samba packages)
ronnie sahlberg
ronniesahlberg at gmail.com
Thu Jul 10 09:10:46 GMT 2008
Hi,
On Thu, Jul 10, 2008 at 5:04 PM, Mathieu PARENT <math.parent at gmail.com> wrote:
> Hi,
>
> Thanks for your quick reply.
>
> On Wed, Jul 9, 2008 at 11:39 PM, ronnie sahlberg
> <ronniesahlberg at gmail.com> wrote:
>> Hi,
>>
>> Can you please provide any patches you have for /etc/ctdb/functions
> none
>
>> and the scripts in /etc/ctdb/events.d
>> I am not sure that the mainline version of ctdb has fully debianized scripts.
>
> Sure: http://svn.debian.org/wsvn/pkg-samba/trunk/ctdb/debian/patches/06_services_names.diff?op=file&rev=0&sc=0
> (this is a very trivial patch, because some part is already merged,
> see https://bugzilla.samba.org/show_bug.cgi?id=5258).
I do not like this patch.
It is very small and trivial but it does mean that debian and rhel
would now have different event scripts which I would like to avoid.
May I propose a slightly different approach?
If you have a look at /etc/ctdb/functions
you will see that the "service" we call from the event script is not
your normal /sbin/service executable but rather our
own shell function called "service" :
######################################################
# simulate /sbin/service on platforms that don't have it
service() {
service_name="$1"
op="$2"
if [ -x /sbin/service ]; then
/sbin/service "$service_name" "$op"
elif [ -x /etc/init.d/$service_name ]; then
/etc/init.d/$service_name "$op"
elif [ -x /etc/rc.d/init.d/$service_name ]; then
/etc/rc.d/init.d/$service_name "$op"
fi
}
Instead of patching the eventscripts, please enhance this service() function to
1, detect if this is a debian system
2, if so, translate httpd -> apache2 etc.
I would be happy to apply such a patch to upstream.
It may sound like a very trivial nitpicking request but it would allow
us to have the exact same eventscripts for both debian and rhel.
That would have great value.
regards
ronnie sahlberg
More information about the samba-technical
mailing list