SOURCES: apport.init - respeck subsys locks, so app won't be resta...

glen glen at pld-linux.org
Thu Apr 24 13:07:28 CEST 2008


Author: glen                         Date: Thu Apr 24 11:07:28 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- respeck subsys locks, so app won't be restarted on runlevel changes

---- Files affected:
SOURCES:
   apport.init (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/apport.init
diff -u SOURCES/apport.init:1.4 SOURCES/apport.init:1.5
--- SOURCES/apport.init:1.4	Thu Apr 24 13:01:33 2008
+++ SOURCES/apport.init	Thu Apr 24 13:07:23 2008
@@ -38,19 +38,27 @@
 }
 
 start() {
-	show "Enabling apport crash handling"
-	busy
-	enable_apport
-	touch /var/lock/subsys/apport
-	ok
+	if [ ! -f /var/lock/subsys/apport ]; then
+		show "Enabling Apport crash handling"
+		busy
+		enable_apport
+		touch /var/lock/subsys/apport
+		ok
+	else
+		msg_already_running "Apport crash handling"
+	fi
 }
 
 stop() {
-	show "Disabling apport crash handling"
-	busy
-	disable_apport
-	rm -f /var/lock/subsys/apport
-	ok
+	if [ -f /var/lock/subsys/apport ]; then
+		show "Disabling Apport crash handling"
+		busy
+		disable_apport
+		rm -f /var/lock/subsys/apport
+		ok
+	else
+		msg_not_running "Apport crash handling"
+	fi
 }
 
 RETVAL=0
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/apport.init?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list