File: initscript-exit.patch

package info (click to toggle)
libcgroup 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,840 kB
  • sloc: ansic: 15,527; python: 8,219; cpp: 5,652; sh: 5,209; yacc: 470; makefile: 419; lex: 38
file content (38 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Daniel Baumann <mail@daniel-baumann.ch>
Date: Thu, 19 Sep 2013 08:33:12 +0200
Subject: Correcting sanity checks in example initscripts (Closes: #704926).

Last-Update: 2014-07-26
---
 scripts/init.d/cgconfig.in | 3 +++
 scripts/init.d/cgred.in    | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Index: libcgroup/scripts/init.d/cgconfig.in
===================================================================
--- libcgroup.orig/scripts/init.d/cgconfig.in
+++ libcgroup/scripts/init.d/cgconfig.in
@@ -32,6 +32,10 @@ servicename=cgconfig
 
 
 lockfile=/run/lock/subsys/$servicename
+
+# Sanity checks
+[ -x $CGCONFIGPARSER_BIN ] || exit 0
+
 #
 # Source LSB routines
 #
Index: libcgroup/scripts/init.d/cgred.in
===================================================================
--- libcgroup.orig/scripts/init.d/cgred.in
+++ libcgroup/scripts/init.d/cgred.in
@@ -30,7 +30,7 @@ sbindir=@sbindir@
 CGRED_BIN=$sbindir/cgrulesengd
 
 # Sanity checks
-[[ -x $CGRED_BIN ]] || exit 1
+[[ -x $CGRED_BIN ]] || exit 0
 
 #
 # Source LSB routines