summaryrefslogtreecommitdiff
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:20 +0000
commit942739b6a1e786a06b6aa67f6be8158232a9f98a (patch)
tree72a4efba4e31713e60d454e5aedf8d5be801b604 /meta
parent42dde10337d464948ede8f7e7eec543f2396793e (diff)
downloadopenembedded-core-942739b6a1e786a06b6aa67f6be8158232a9f98a.tar.gz
openembedded-core-942739b6a1e786a06b6aa67f6be8158232a9f98a.tar.bz2
openembedded-core-942739b6a1e786a06b6aa67f6be8158232a9f98a.zip
ppp-dialin: use useradd.bbclass instead of hardcoded adduser/deluser calls
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
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"
DESCRIPTION = "Enables PPP dial-in through a serial connection"
DEPENDS = "ppp"
RDEPENDS_${PN} = "ppp"
-PR = "r7"
+PR = "r8"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
SRC_URI = "file://host-peer \
file://ppp-dialin"
-inherit allarch
+inherit allarch useradd
do_install() {
install -d ${D}${sysconfdir}/ppp/peers
@@ -20,18 +20,7 @@ do_install() {
install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
}
-pkg_postinst_${PN} () {
-if test "x$D" != "x"; then
- exit 1
-else
- adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
-fi
-}
-
-pkg_postrm_${PN} () {
-if test "x$D" != "x"; then
- exit 1
-else
- deluser ppp
-fi
-}
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home /dev/null \
+ --no-create-home --shell ${sbindir}/ppp-dialin \
+ --no-user-group --gid nogroup ppp"