diff options
Diffstat (limited to 'recipes-connectivity/ppp/ppp_%.bbappend')
-rw-r--r-- | recipes-connectivity/ppp/ppp_%.bbappend | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/recipes-connectivity/ppp/ppp_%.bbappend b/recipes-connectivity/ppp/ppp_%.bbappend index 072fcd3..510765b 100644 --- a/recipes-connectivity/ppp/ppp_%.bbappend +++ b/recipes-connectivity/ppp/ppp_%.bbappend @@ -1,9 +1,27 @@ +# +# ${PN}-radioresetwait depends on ${PN}-waitforresetfunc +# With these installed, ppp will wait for radio-reset to +# finish before proceeding with starting the pppd daemon. +# +# These functions require corresponding features in +# mts-io and udev to monitor the radio-reset +# SRC_URI_append = "\ file://init.patch;patchdir=.. \ + file://default.patch;patchdir=.. \ file://poff.patch;patchdir=.. \ + file://wait_for_reset \ file://default" -PR = "r10" +PR = "r11" + +PACKAGES =+ "${PN}-radioresetwait ${PN}-waitforresetfunc" +FILES_${PN}-waitforresetfunc = "${libexecdir}/ppp/wait_for_reset" + +RDEPENDS_${PN}-radioresetwait += "${PN}-waitforresetfunc" +RDEPENDS_${PN}-waitforresetfunc += "bash" + +ALLOW_EMPTY_${PN}-radioresetwait = "1" FILESEXTRAPATHS_prepend := "${THISDIR}/files:" @@ -11,6 +29,16 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" CONFFILES_${PN} += "${sysconfdir}/init.d/ppp" do_install_append() { - install -d -m 0755 ${D}/${sysconfdir}/default/ + 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 } + +pkg_postinst_${PN}-radioresetwait() { + sed -i 's/^RADIORESETWAIT="no"/RADIORESETWAIT="yes"/' $D${sysconfdir}/default/ppp +} +pkg_prerm_${PN}-radioresetwait() { + sed -i 's/^RADIORESETWAIT="yes"/RADIORESETWAIT="no"/' $D${sysconfdir}/default/ppp +} + |