From: Ming Liu <ming.liu@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH V4 3/3] screen: dynamically add or remove a entry to/from /etc/shells
Date: Sun, 20 Oct 2013 16:02:29 +0800 [thread overview]
Message-ID: <1382256149-14223-3-git-send-email-ming.liu@windriver.com> (raw)
In-Reply-To: <1382256149-14223-1-git-send-email-ming.liu@windriver.com>
1 Add base-files to RDEPENDS.
2 Add pkg_postinst and pkg_postrm to add and remove a entry in
/etc/shells.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
meta/recipes-extended/screen/screen_4.0.3.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index 1a7eb20..be42fb9 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \
SECTION = "console/utils"
DEPENDS = "ncurses \
${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "base-files"
+
PR = "r3"
SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \
@@ -41,3 +43,11 @@ do_install_append () {
fi
done
}
+
+pkg_postinst_${PN} () {
+ grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+ printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
--
1.8.4.1
next prev parent reply other threads:[~2013-10-20 8:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-20 8:02 [PATCH V4 1/3] base-files: remove invalid entries from /etc/shells Ming Liu
2013-10-20 8:02 ` [PATCH V4 2/3] bash: dynamically add or remove a entry to/from /etc/shells Ming Liu
2013-10-20 8:02 ` Ming Liu [this message]
2013-10-21 22:32 ` [PATCH V4 3/3] screen: " Khem Raj
2013-10-22 2:12 ` Ming Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382256149-14223-3-git-send-email-ming.liu@windriver.com \
--to=ming.liu@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox