diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2015-01-22 17:09:14 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-28 21:22:21 +0000 |
commit | 3b0d6c7c324f0283cfab10445d1a5a3bf2526598 (patch) | |
tree | 05f3de5e9e1fc55a5b166865846ebe0237c8f286 /meta | |
parent | 7e9fd9d34a540fdfc1243d059d1f13f1d09864d2 (diff) | |
download | openembedded-core-3b0d6c7c324f0283cfab10445d1a5a3bf2526598.tar.gz openembedded-core-3b0d6c7c324f0283cfab10445d1a5a3bf2526598.tar.bz2 openembedded-core-3b0d6c7c324f0283cfab10445d1a5a3bf2526598.zip |
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]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rwxr-xr-x | meta/recipes-devtools/distcc/files/distcc | 5 |
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() { echo "$DAEMON not starting" exit 0 fi + # we need permission to write to the pid file + touch /var/run/$NAME.pid + chown distcc /var/run/$NAME.pid } case "$1" in @@ -75,6 +78,7 @@ case "$1" in echo "$0: stop failed with error code $code" >&2 exit $code } + rm -f /var/run/$NAME.pid >/dev/null 2>&1 echo "." ;; restart|force-reload) @@ -92,6 +96,7 @@ case "$1" in --exec $DAEMON -- $DAEMON_ARGS $ALLOW || { code=$? + rm -f /var/run/$NAME.pid >/dev/null 2>&1 echo "$0: restart failed with error code $code" >&2 exit $code } |