diff options
| author | John Klug <john.klug@multitech.com> | 2017-09-05 19:52:26 -0500 |
|---|---|---|
| committer | John Klug <john.klug@multitech.com> | 2017-09-05 19:52:26 -0500 |
| commit | 6d6f3e3de08dd0ac37966e4516f5431c16a8d8d4 (patch) | |
| tree | 104fa81c9568f892a9b6f2058eca11d47f517203 /recipes-connectivity/ppp/files/init.patch | |
| parent | 25f33d55fa67a6a9e0c8a39f36a2ce7c8a41057b (diff) | |
| download | meta-mlinux-6d6f3e3de08dd0ac37966e4516f5431c16a8d8d4.tar.gz meta-mlinux-6d6f3e3de08dd0ac37966e4516f5431c16a8d8d4.tar.bz2 meta-mlinux-6d6f3e3de08dd0ac37966e4516f5431c16a8d8d4.zip | |
Get ppp to work from boot up
Diffstat (limited to 'recipes-connectivity/ppp/files/init.patch')
| -rw-r--r-- | recipes-connectivity/ppp/files/init.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-connectivity/ppp/files/init.patch b/recipes-connectivity/ppp/files/init.patch new file mode 100644 index 0000000..e74e981 --- /dev/null +++ b/recipes-connectivity/ppp/files/init.patch @@ -0,0 +1,34 @@ +diff -Naru old/init new/init +--- old/init 2017-09-05 19:07:19.810885424 -0500 ++++ new/init 2017-09-05 19:08:05.106884083 -0500 +@@ -8,11 +8,29 @@ + + test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 + if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi +- ++: ${PPPTIMEOUT:=60} ++logger timeout is $PPPTIMEOUT ++[ -f /etc/default/ppp ] && . /etc/default/ppp + case "$1" in + start) ++ t0=($(cat /proc/uptime)) ++ if (( CHECKREGISTRATION == 1 )) ; then while : ; do ++ REG=$(/usr/bin/radio-query --netreg) ++ [[ $REG == "REGISTERED" ]] && break ++ t1=($(cat /proc/uptime)) ++ diff=$(awk "BEGIN{print int($t1-$t0)}") ++ logger -s "Modem not ready. Waited $diff of $PPPTIMEOUT seconds" ++ if ((diff > PPPTIMEOUT)) ; then ++ logger -s "Timed out waiting for modem registration" ++ exit 1 ++ fi ++ sleep 1 ++ done ; fi ++ ++ logger "Starting up PPP link: pppd" + echo -n "Starting up PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then ++ logger "ppp_on_boot" + /etc/ppp/ppp_on_boot + else + pppd call provider |
