diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2011-11-19 15:56:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-30 15:38:30 +0000 |
commit | bfa270b94fc14d014914ed6558095109bbe4e222 (patch) | |
tree | 8f4d5fe53f5a62a239d96a2f7dfe12c6b034570e | |
parent | 9f5bc2177502a9872a4276407ed6a555e97fd6e6 (diff) | |
download | poky-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>
-rw-r--r-- | meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb | 23 |
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" | |||
2 | DESCRIPTION = "Enables PPP dial-in through a serial connection" | 2 | DESCRIPTION = "Enables PPP dial-in through a serial connection" |
3 | DEPENDS = "ppp" | 3 | DEPENDS = "ppp" |
4 | RDEPENDS_${PN} = "ppp" | 4 | RDEPENDS_${PN} = "ppp" |
5 | PR = "r7" | 5 | PR = "r8" |
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | 7 | LIC_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 | |||
10 | SRC_URI = "file://host-peer \ | 10 | SRC_URI = "file://host-peer \ |
11 | file://ppp-dialin" | 11 | file://ppp-dialin" |
12 | 12 | ||
13 | inherit allarch | 13 | inherit allarch useradd |
14 | 14 | ||
15 | do_install() { | 15 | do_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 | ||
23 | pkg_postinst_${PN} () { | 23 | USERADD_PACKAGES = "${PN}" |
24 | if test "x$D" != "x"; then | 24 | USERADD_PARAM_${PN} = "--system --home /dev/null \ |
25 | exit 1 | 25 | --no-create-home --shell ${sbindir}/ppp-dialin \ |
26 | else | 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 | ||
28 | fi | ||
29 | } | ||
30 | |||
31 | pkg_postrm_${PN} () { | ||
32 | if test "x$D" != "x"; then | ||
33 | exit 1 | ||
34 | else | ||
35 | deluser ppp | ||
36 | fi | ||
37 | } | ||