diff options
author | John Klug <john.klug@multitech.com> | 2018-03-22 12:18:40 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-03-22 12:18:40 -0500 |
commit | 370c2513914076e0815f8e36bcd200ca740a1163 (patch) | |
tree | 5d0f0ae923ba4ee56434d6a07e627147513c8b83 /recipes-navigation | |
parent | 23e0897097046ef298c154967bb3a1fb06404a22 (diff) | |
download | meta-mlinux-atmel-370c2513914076e0815f8e36bcd200ca740a1163.tar.gz meta-mlinux-atmel-370c2513914076e0815f8e36bcd200ca740a1163.tar.bz2 meta-mlinux-atmel-370c2513914076e0815f8e36bcd200ca740a1163.zip |
pgrep does not work during boot causing gpsd_ubx_* commands to hang.
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh | 5 | ||||
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh | 5 | ||||
-rw-r--r-- | recipes-navigation/gpsd/gpsd_3.16.bb | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh b/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh index 6c9c126..a1b59cf 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh +++ b/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh @@ -59,7 +59,10 @@ fi ps -fjp $ppid | LG -p user.error fi - gpsmonpid=$(pgrep -lg $pgid | egrep '[[:space:]]gpsmon$' | sed 's/[[:space:]].*//') + # pgrep does not work during boot. + pgrpmemb=$(ps --no-heading -o pgid,pid,comm -e | grep '^ *'"${pgid}"' *' | sed -r 's/^ *[0-9]+ *//') + gpsmonpid=$(echo "${pgrpmemb}" | egrep '[[:space:]]gpsmon$' | sed 's/[[:space:]].*//') + ((DEBUG)) && LG -p user.info "$pgid is pgid $gpsmonpid is gpsmonpid" # Find the gpsmonpid that is our grandchild ((didkill=0)) diff --git a/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh b/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh index f74e7b0..15dc9c7 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh +++ b/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh @@ -38,7 +38,10 @@ fi ps -fjp $ppid | LG -p user.error fi - gpsmonpid=$(pgrep -lg $pgid | egrep '[[:space:]]gpsmon$' | sed 's/[[:space:]].*//') + # pgrep does not work during boot. + pgrpmemb=$(ps --no-heading -o pgid,pid,comm -e | grep '^ *'"${pgid}"' *' | sed -r 's/^ *[0-9]+ *//') + gpsmonpid=$(echo "${pgrpmemb}" | egrep '[[:space:]]gpsmon$' | sed 's/[[:space:]].*//') + ((DEBUG)) && LG -p user.info "$pgid is pgid $gpsmonpid is gpsmonpid" # Find the gpsmonpid that is our grandchild ((didkill=0)) diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb index 4e650dc..68d54ff 100644 --- a/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m4" +PR="m7" EXTRANATIVEPATH += "chrpath-native" |