aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-05 01:49:28 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-12 13:14:09 +0100
commitddb1f5f9397f75c1aa0f6c6072e5d0e7786ffbfc (patch)
tree1f3d5cda2173ab00f414b1953f6853fc2716d028
parent4cf803fc8d982c9cb47b119e69d249b150d7197c (diff)
downloadmeta-handheld-ddb1f5f9397f75c1aa0f6c6072e5d0e7786ffbfc.tar.gz
zaurusd: remove dependency on procps
With a little tweaking we don't need procps; we can rely on what busybox provides. If nothing else requires procps this saves some space on the target. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--recipes-bsp/zaurusd/zaurusd/scripts_pidof.patch33
-rw-r--r--recipes-bsp/zaurusd/zaurusd/zaurus-hinge.in11
-rw-r--r--recipes-bsp/zaurusd/zaurusd/zaurus-hinge.matchbox-portrait4
-rw-r--r--recipes-bsp/zaurusd/zaurusd_git.bb4
4 files changed, 43 insertions, 9 deletions
diff --git a/recipes-bsp/zaurusd/zaurusd/scripts_pidof.patch b/recipes-bsp/zaurusd/zaurusd/scripts_pidof.patch
new file mode 100644
index 0000000..9eed68f
--- /dev/null
+++ b/recipes-bsp/zaurusd/zaurusd/scripts_pidof.patch
@@ -0,0 +1,33 @@
+From f271fa43ec63ed5650296a393403318ab0e553d4 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Sun, 5 Aug 2012 01:41:16 +0100
+Subject: [PATCH] scripts/zaurusd: use pidof instead of mangling output of ps
+
+busybox provides working pidof if sysvinit doesn't, so use that.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ scripts/zaurusd.in | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+diff --git a/scripts/zaurusd.in b/scripts/zaurusd.in
+index ad896aa..acb5158 100755
+--- a/scripts/zaurusd.in
++++ b/scripts/zaurusd.in
+@@ -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
+ }
+
+--
+1.7.1
+
diff --git a/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.in b/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.in
index 0fcad38..660e6cc 100644
--- a/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.in
+++ b/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.in
@@ -4,10 +4,7 @@
#
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
}
@@ -19,7 +16,11 @@ if [ -z "$1" ]; then
exit 1
fi
-panel_user="`ps aux|grep matchbox-panel|grep -v grep | awk '{print $1}'`"
+if [ ps aux > /dev/null 2>&1 ] ; then
+ panel_user="`ps aux|grep matchbox-panel|grep -v grep | awk '{print $1}'`"
+else
+ panel_user="`ps|grep matchbox-panel|grep -v grep | awk '{print $2}'`"
+fi
STATE=$1
diff --git a/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.matchbox-portrait b/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.matchbox-portrait
index e540e66..bce305d 100644
--- a/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.matchbox-portrait
+++ b/recipes-bsp/zaurusd/zaurusd/zaurus-hinge.matchbox-portrait
@@ -21,9 +21,9 @@
if test -n "$panel_user"
then
echo "Running panel as user [$panel_user]"
- ps aux | grep "$panel_user" | grep -q "mbinputmgr " || su $panel_user -c ${ZD_BINDIR}/mbinputmgr &
+ ps aux 2>/dev/null || ps | grep "$panel_user" | grep -q "mbinputmgr " || su $panel_user -c ${ZD_BINDIR}/mbinputmgr &
else
# A failsafe can't hurt
echo "Warning: Running mbinputmgr as root!"
- ps aux | grep -q "mbinputmgr " || ${ZD_BINDIR}/mbinputmgr &
+ ps aux 2>/dev/null || ps | grep -q "mbinputmgr " || ${ZD_BINDIR}/mbinputmgr &
fi
diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb b/recipes-bsp/zaurusd/zaurusd_git.bb
index db24c7b..821dbec 100644
--- a/recipes-bsp/zaurusd/zaurusd_git.bb
+++ b/recipes-bsp/zaurusd/zaurusd_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "tslib"
PE = "1"
PV = "0.0+gitr${SRCPV}"
-PR = "r25"
+PR = "r26"
SRCREV = "82b30c7865f007fff81372c3cdc71b2ff6843ccc"
SRC_URI = "git://git.yoctoproject.org/zaurusd;protocol=git \
@@ -17,6 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/zaurusd;protocol=git \
file://disable-alsa-handling.patch \
file://avoid-rotated-server.patch \
file://new-make.patch \
+ file://scripts_pidof.patch \
file://zaurus-hinge.matchbox-portrait \
file://zaurus-hinge.matchbox-landscape \
file://zaurus-hinge.bl-on \
@@ -57,6 +58,5 @@ inherit autotools pkgconfig update-rc.d
INITSCRIPT_NAME = "zaurusd"
INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
-RDEPENDS_${PN} = "procps"
RRECOMMENDS_${PN} += "kernel-module-uinput"