Patchwork [1/1] formfactor: use full path to fbset

login
register
mail settings
Submitter Paul Eggleton
Date March 6, 2012, 11:55 p.m.
Message ID <50d2b32b6d5367e5822c396d28a78ea54cb4ea40.1331078069.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/22845/
State Accepted
Commit fb2df75e1552e60c67449c06cd80accc40ea534e
Headers show

Comments

Paul Eggleton - March 6, 2012, 11:55 p.m.
When using rootless X, /usr/sbin is not in PATH and thus running "fbset"
will fail; so specify /usr/sbin/fbset instead.

Fixes [YOCTO #1986]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-bsp/formfactor/files/config      |    6 +++---
 meta/recipes-bsp/formfactor/formfactor_0.0.bb |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Khem Raj - March 7, 2012, 2:14 a.m.
On 03/06/2012 03:55 PM, Paul Eggleton wrote:
> When using rootless X, /usr/sbin is not in PATH and thus running "fbset"
> will fail; so specify /usr/sbin/fbset instead.
>

just curious why is /usr/sbin omitted from PATH ?
Paul Eggleton - March 12, 2012, 5:53 p.m.
On Tuesday 06 March 2012 18:14:52 Khem Raj wrote:
> On 03/06/2012 03:55 PM, Paul Eggleton wrote:
> > When using rootless X, /usr/sbin is not in PATH and thus running "fbset"
> > will fail; so specify /usr/sbin/fbset instead.
> 
> just curious why is /usr/sbin omitted from PATH ?

With the rootless X implementation we have, you're logged in as "xuser" 
instead of root. I guess our default is to not include /sbin and /usr/sbin in 
PATH for non-root users.

Cheers,
Paul
Khem Raj - March 12, 2012, 7:39 p.m.
On Mon, Mar 12, 2012 at 10:53 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> I guess our default is to not include /sbin and /usr/sbin in
> PATH for non-root users.

OK true. I get it now

Patch

diff --git a/meta/recipes-bsp/formfactor/files/config b/meta/recipes-bsp/formfactor/files/config
index e936916..a3f762a 100755
--- a/meta/recipes-bsp/formfactor/files/config
+++ b/meta/recipes-bsp/formfactor/files/config
@@ -29,15 +29,15 @@  if [ -z "$DISPLAY_ORIENTATION" ]; then
 fi
 
 if [ -z "$DISPLAY_WIDTH_PIXELS" ]; then
-    DISPLAY_WIDTH_PIXELS=`fbset | grep geometry | awk '{ print $2 }'`
+    DISPLAY_WIDTH_PIXELS=`/usr/sbin/fbset | grep geometry | awk '{ print $2 }'`
 fi
 
 if [ -z "$DISPLAY_HEIGHT_PIXELS" ]; then
-    DISPLAY_HEIGHT_PIXELS=`fbset | grep geometry | awk '{ print $3 }'`
+    DISPLAY_HEIGHT_PIXELS=`/usr/sbin/fbset | grep geometry | awk '{ print $3 }'`
 fi
 
 if [ -z "$DISPLAY_BPP" ]; then
-    DISPLAY_BPP=`fbset | grep geometry | awk '{ print $6 }'`
+    DISPLAY_BPP=`/usr/sbin/fbset | grep geometry | awk '{ print $6 }'`
 fi
 
 # 
diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
index abf20e0..31b4490 100644
--- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb
+++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
@@ -3,7 +3,7 @@  SECTION = "base"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r19"
+PR = "r20"
 
 SRC_URI = "file://config file://machconfig"
 S = "${WORKDIR}"