2 Commits

Author SHA1 Message Date
Jay Larson
c6456ba7d3 Modified init-functions so that pidofproc properly returns non-zero 2018-09-30 19:07:50 -05:00
Jay Larson
a101cfe1c0 Added dependencies on grep and sed 2018-09-30 18:43:44 -05:00
2 changed files with 5 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = dash,kmod,perl,procps-ng,sysvinit DEPENDS = dash,grep,kmod,perl,procps-ng,sed,sysvinit
ARCH = x86_64 ARCH = x86_64
URL = http://snaplinux.org URL = http://snaplinux.org
REPO = core REPO = core
@@ -18,7 +18,7 @@ DESC = This package supplies the core required init scripts for startup
ARCHIVE := '' ARCHIVE := ''
SRCDIR := $(PWD)/SRC/initscripts SRCDIR := $(PWD)/SRC/initscripts
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := 1.9-0 VERSION := 1.10-0
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

View File

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