summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2015-01-22 17:09:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-11 17:40:08 +0000
commit82c567748ada3aa0fe5cf4d948c492edbe6deff4 (patch)
tree2f4d86f3455aab2ec3a3552ed9c5f519e81e663e /meta
parentd3953fcb409e75ad3d9069ef1d533f7e68a9baf8 (diff)
downloadpoky-82c567748ada3aa0fe5cf4d948c492edbe6deff4.tar.gz
distcc: fix initscript can not stop distcc daemon correctly
The distcc's initscript has used option '--pid-file' to save daemon process id, but it didn't to create that file, that caused start/stop distcc daemon failed. We refer what Ubuntu 14.04 did, create pid file before start and delete it after stop [YOCTO #7090] (From OE-Core rev: 3b0d6c7c324f0283cfab10445d1a5a3bf2526598) (From OE-Core rev: b9dc92ae6efbedcca4e21479412d6d4954c05bce) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-devtools/distcc/files/distcc5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
index c7c414d829..e36f0fa695 100755
--- a/meta/recipes-devtools/distcc/files/distcc
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -51,6 +51,9 @@ should_start() {
51 echo "$DAEMON not starting" 51 echo "$DAEMON not starting"
52 exit 0 52 exit 0
53 fi 53 fi
54 # we need permission to write to the pid file
55 touch /var/run/$NAME.pid
56 chown distcc /var/run/$NAME.pid
54} 57}
55 58
56case "$1" in 59case "$1" in
@@ -75,6 +78,7 @@ case "$1" in
75 echo "$0: stop failed with error code $code" >&2 78 echo "$0: stop failed with error code $code" >&2
76 exit $code 79 exit $code
77 } 80 }
81 rm -f /var/run/$NAME.pid >/dev/null 2>&1
78 echo "." 82 echo "."
79 ;; 83 ;;
80 restart|force-reload) 84 restart|force-reload)
@@ -92,6 +96,7 @@ case "$1" in
92 --exec $DAEMON -- $DAEMON_ARGS $ALLOW || 96 --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
93 { 97 {
94 code=$? 98 code=$?
99 rm -f /var/run/$NAME.pid >/dev/null 2>&1
95 echo "$0: restart failed with error code $code" >&2 100 echo "$0: restart failed with error code $code" >&2
96 exit $code 101 exit $code
97 } 102 }