summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-11-19 15:56:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-30 15:38:30 +0000
commitbfa270b94fc14d014914ed6558095109bbe4e222 (patch)
tree8f4d5fe53f5a62a239d96a2f7dfe12c6b034570e /meta
parent9f5bc2177502a9872a4276407ed6a555e97fd6e6 (diff)
downloadpoky-bfa270b94fc14d014914ed6558095109bbe4e222.tar.gz
ppp-dialin: use useradd.bbclass instead of hardcoded adduser/deluser calls
(From OE-Core rev: 942739b6a1e786a06b6aa67f6be8158232a9f98a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb23
1 files changed, 6 insertions, 17 deletions
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
index d4ac77e921..d239c20b21 100644
--- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -2,7 +2,7 @@ SECTION = "console/network"
2DESCRIPTION = "Enables PPP dial-in through a serial connection" 2DESCRIPTION = "Enables PPP dial-in through a serial connection"
3DEPENDS = "ppp" 3DEPENDS = "ppp"
4RDEPENDS_${PN} = "ppp" 4RDEPENDS_${PN} = "ppp"
5PR = "r7" 5PR = "r8"
6LICENSE = "MIT" 6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ 7LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
8 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 8 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
10SRC_URI = "file://host-peer \ 10SRC_URI = "file://host-peer \
11 file://ppp-dialin" 11 file://ppp-dialin"
12 12
13inherit allarch 13inherit allarch useradd
14 14
15do_install() { 15do_install() {
16 install -d ${D}${sysconfdir}/ppp/peers 16 install -d ${D}${sysconfdir}/ppp/peers
@@ -20,18 +20,7 @@ do_install() {
20 install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir} 20 install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
21} 21}
22 22
23pkg_postinst_${PN} () { 23USERADD_PACKAGES = "${PN}"
24if test "x$D" != "x"; then 24USERADD_PARAM_${PN} = "--system --home /dev/null \
25 exit 1 25 --no-create-home --shell ${sbindir}/ppp-dialin \
26else 26 --no-user-group --gid nogroup ppp"
27 adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
28fi
29}
30
31pkg_postrm_${PN} () {
32if test "x$D" != "x"; then
33 exit 1
34else
35 deluser ppp
36fi
37}