summaryrefslogtreecommitdiff
path: root/recipes-connectivity/ppp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-12-21 11:17:53 -0600
committerSerhii Voloshynov <serhii.voloshynov@globallogic.com>2022-01-12 14:39:30 +0200
commit83e2356264c814eb2a8acea95a5866e5d9656757 (patch)
treefda3c3f2fb76d908b3eeb4345a24c82f0669de22 /recipes-connectivity/ppp
parentbe0069adf8794e129cd5b01d4b1052677136d82c (diff)
downloadmeta-mlinux-83e2356264c814eb2a8acea95a5866e5d9656757.tar.gz
meta-mlinux-83e2356264c814eb2a8acea95a5866e5d9656757.tar.bz2
meta-mlinux-83e2356264c814eb2a8acea95a5866e5d9656757.zip
AT&T Data-Only Requirements
Diffstat (limited to 'recipes-connectivity/ppp')
-rw-r--r--recipes-connectivity/ppp/files/init.patch10
-rwxr-xr-xrecipes-connectivity/ppp/files/wait_for_reset45
-rw-r--r--recipes-connectivity/ppp/ppp_%.bbappend13
3 files changed, 8 insertions, 60 deletions
diff --git a/recipes-connectivity/ppp/files/init.patch b/recipes-connectivity/ppp/files/init.patch
index 00ae09a..333c428 100644
--- a/recipes-connectivity/ppp/files/init.patch
+++ b/recipes-connectivity/ppp/files/init.patch
@@ -7,9 +7,9 @@ diff -Naru orig/init new/init
. /etc/init.d/functions
+. /etc/default/ppp
+if [[ $RADIORESETWAIT == yes ]] ; then
-+ . /usr/libexec/ppp/wait_for_reset
++ WAITFORRESET=/usr/bin/mts-wait-for-cell-reset
+else
-+ function wait_for_reset { :; }
++ WAITFORRESET=":"
+fi
+
+mkdir -p /run/ppp || true
@@ -21,7 +21,7 @@ diff -Naru orig/init new/init
case "$1" in
start)
echo -n "Starting up PPP link: pppd"
-+ wait_for_reset
++ ${WAITFORRESET}
if [ "$RUNFILE" = "1" ]; then
+ logger "ppp_on_boot"
/etc/ppp/ppp_on_boot
@@ -35,13 +35,13 @@ diff -Naru orig/init new/init
+ if [ "$RUNFILE" = "1" ]; then
poff
sleep 5
-+ wait_for_reset
++ ${WAITFORRESET}
/etc/ppp/ppp_on_boot
- else
+ else
poff provider
sleep 5
-+ wait_for_reset
++ ${WAITFORRESET}
pppd call provider
fi
echo "."
diff --git a/recipes-connectivity/ppp/files/wait_for_reset b/recipes-connectivity/ppp/files/wait_for_reset
deleted file mode 100755
index e77df77..0000000
--- a/recipes-connectivity/ppp/files/wait_for_reset
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# For ppp to work, stty must work on file descriptor 0.
-# If stty fails, so will ppp.
-
-NAME=wait_for_reset
-
-: ${LOG:="/usr/bin/logger -t ${NAME} -p daemon.notice"}
-
-USR2=12
-TERM=15
-# Child used to set our PID in the radio-reset-monitor
-function sleep_reset
-{
- # Wait for parent to enter wait.
- trap "exit 0" $TERM
- while [[ $(ps -h -o wchan -p $PPID) != do_wait ]] ; do usleep 100 ; done
- ${LOG} Register for SIGUSR2 when radio-reset complete
- echo "$$" "$USR2" >/sys/devices/platform/mts-io/radio-reset-monitor
- discovered=$(cat /sys/devices/platform/mts-io/radio-udev-discovery)
- if ((discovered == 1)) ; then
- # reset is not in progress.
- exit 0
- fi
- sleep 4294967295 # Hopefully forever
- exit 0
-}
-
-# Wait for radio-reset to complete
-function wait_for_reset
-{
- # Wait for radio reset/modem discovery
- trap ":" $USR2
- in_reset=$(cat /sys/devices/platform/mts-io/radio-udev-discovery)
- if ((in_reset == 0)) ; then
- sleep_reset &
- wait $!
- # pgrep is needed to find the sleep process
- echo "pgrep -P: $(pgrep -P $!)"
- pgrep -P $! | xargs kill
- ${LOG} "radio-reset is complete"
- fi
- echo "$$" "0" >/sys/devices/platform/mts-io/radio-reset-monitor
- trap "" $USR2
-}
diff --git a/recipes-connectivity/ppp/ppp_%.bbappend b/recipes-connectivity/ppp/ppp_%.bbappend
index fafe176..0a7e818 100644
--- a/recipes-connectivity/ppp/ppp_%.bbappend
+++ b/recipes-connectivity/ppp/ppp_%.bbappend
@@ -10,16 +10,11 @@ SRC_URI_append = "\
file://init.patch;patchdir=.. \
file://default.patch;patchdir=.. \
file://poff.patch;patchdir=.. \
- file://wait_for_reset \
file://default"
PR = "r12"
-PACKAGES =+ "${PN}-radioresetwait ${PN}-waitforresetfunc"
-FILES_${PN}-waitforresetfunc = "${libexecdir}/ppp/wait_for_reset"
-
-RDEPENDS_${PN}-radioresetwait += "${PN}-waitforresetfunc"
-RDEPENDS_${PN}-waitforresetfunc += "bash"
+PACKAGES =+ "${PN}-radioresetwait"
ALLOW_EMPTY_${PN}-radioresetwait = "1"
@@ -29,10 +24,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
CONFFILES_${PN} += "${sysconfdir}/init.d/ppp"
do_install_append() {
- install -d -m 755 ${D}/${sysconfdir}/default/
- install -m 644 ${WORKDIR}/default ${D}/${sysconfdir}/default/ppp
- install -d -m 755 ${D}/${libexecdir}/ppp
- install -m 755 ${WORKDIR}/wait_for_reset ${D}/${libexecdir}/ppp/wait_for_reset
+ install -d -m 755 ${D}/${sysconfdir}/default/
+ install -m 644 ${WORKDIR}/default ${D}/${sysconfdir}/default/ppp
}
pkg_postinst_${PN}-radioresetwait() {