[Pkg-samba-maint] r3385 - in trunk/ctdb/debian: . patches

sathieu at alioth.debian.org sathieu at alioth.debian.org
Mon Mar 8 20:36:04 UTC 2010


Author: sathieu
Date: 2010-03-08 20:35:56 +0000 (Mon, 08 Mar 2010)
New Revision: 3385

Added:
   trunk/ctdb/debian/patches/71-correct-nice_service.diff
Modified:
   trunk/ctdb/debian/changelog
   trunk/ctdb/debian/patches/series
Log:
Correct nice_service() to be compatible with distributions without service



Modified: trunk/ctdb/debian/changelog
===================================================================
--- trunk/ctdb/debian/changelog	2010-03-06 18:07:54 UTC (rev 3384)
+++ trunk/ctdb/debian/changelog	2010-03-08 20:35:56 UTC (rev 3385)
@@ -1,3 +1,10 @@
+ctdb (1.0.112-11-2) UNRELEASED; urgency=low
+
+  * New 71-correct-nice_service.diff: Correct nice_service() to be compatible
+    with distributions without service
+
+ -- Mathieu Parent <sathieu at debian.org>  Mon, 08 Mar 2010 21:34:35 +0100
+
 ctdb (1.0.112-11-1) unstable; urgency=low
 
   * New upstream release. 1.0.112 branch was recommended by Ronnie Sahlberg on

Added: trunk/ctdb/debian/patches/71-correct-nice_service.diff
===================================================================
--- trunk/ctdb/debian/patches/71-correct-nice_service.diff	                        (rev 0)
+++ trunk/ctdb/debian/patches/71-correct-nice_service.diff	2010-03-08 20:35:56 UTC (rev 3385)
@@ -0,0 +1,45 @@
+Goal: Correct nice_service() to be compatible with distributions without service
+
+Author: Mathieu Parent <math.parent at gmail.com>
+
+Upstream status: https://bugzilla.samba.org/show_bug.cgi?id=7224
+
+From 868d92043d62e6cbd484d368ff938d3f0b007064 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent at gmail.com>
+Date: Mon, 8 Mar 2010 21:19:35 +0100
+Subject: [PATCH] Correct nice_service()
+
+nice takes a binary as argument and not a function or builtin command
+---
+ config/functions |   13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/config/functions b/config/functions
+index b70a352..6556b21 100644
+--- a/config/functions
++++ b/config/functions
+@@ -61,10 +61,19 @@ service() {
+ ######################################################
+ # simulate /sbin/service (niced) on platforms that don't have it
+ nice_service() { 
++  _service_name="$1"
++  _op="$2"
++
+   # do nothing, when no service was specified
+-  [ -z "$1" ] && return
++  [ -z "$_service_name" ] && return
+ 
+-    nice service "$@"
++  if [ -x /sbin/service ]; then
++      nice /sbin/service "$_service_name" "$_op"
++  elif [ -x /etc/init.d/$_service_name ]; then
++      nice /etc/init.d/$_service_name "$_op"
++  elif [ -x /etc/rc.d/init.d/$_service_name ]; then
++      nice /etc/rc.d/init.d/$_service_name "$_op"
++  fi
+ }
+ 
+ ######################################################
+-- 
+1.7.0
+

Modified: trunk/ctdb/debian/patches/series
===================================================================
--- trunk/ctdb/debian/patches/series	2010-03-06 18:07:54 UTC (rev 3384)
+++ trunk/ctdb/debian/patches/series	2010-03-08 20:35:56 UTC (rev 3385)
@@ -5,3 +5,4 @@
 60-spelling-errors.diff
 61-spelling-errors-manpages.diff
 70-nfstickle-sysconfig.diff
+71-correct-nice_service.diff




More information about the Pkg-samba-maint mailing list