Modified init-functions so that pidofproc properly returns non-zero

This commit is contained in:
2018-09-30 19:07:50 -05:00
parent a101cfe1c0
commit c6456ba7d3
2 changed files with 4 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ DESC = This package supplies the core required init scripts for startup
ARCHIVE := ''
SRCDIR := $(PWD)/SRC/initscripts
PATCHDIR := $(PWD)/SRC/patches
VERSION := 1.9-1
VERSION := 1.10-0
include /usr/share/snap/Makefile.snaplinux

View File

@@ -117,7 +117,9 @@ pidofproc() {
esac
done
if [ -r "$pidfile" ]; then
if [ -n "$pidfile" ] && [ ! -r "$pidfile" ]; then
return 1
elif [ -n "$pidfile" ]; then
pids=$(head -1 $pidfile|sed 's/ \+//g')
else
pids=$(pidof "$pathname")