summaryrefslogtreecommitdiff
path: root/recipes-connectivity/ppp/ppp_%.bbappend
blob: 0a7e818e24f060666953edb0dbd260249bee844f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# ${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://default"

PR = "r12"

PACKAGES =+ "${PN}-radioresetwait"

ALLOW_EMPTY_${PN}-radioresetwait = "1"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# AEP compatibility
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
}

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
}