mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
xserver-nodm-init: use pidof instead of ps|grep|grep|sed to get PID of xinit
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3949 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
|
||||
LICENSE = "GPL"
|
||||
SECTION = "x11"
|
||||
PRIORITY = "optional"
|
||||
PR = "r8"
|
||||
PR = "r9"
|
||||
|
||||
SRC_URI = "file://xserver-nodm"
|
||||
S = ${WORKDIR}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
killproc() { # kill the named process(es)
|
||||
pid=`/bin/ps -e x |
|
||||
/bin/grep $1 |
|
||||
/bin/grep -v grep |
|
||||
/bin/sed -e 's/^ *//' -e 's/ .*//'`
|
||||
pid=`/bin/pidof $1`
|
||||
[ "$pid" != "" ] && kill $pid
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user