diff options
author | Ming Liu <ming.liu@windriver.com> | 2013-10-22 11:12:01 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-26 15:53:25 +0100 |
commit | 95618d6d5c4f8e5f0aec632d35e02ad5a33a1f75 (patch) | |
tree | 2522b91feb6c7823e303c18f37cee5b001e9222a /meta/recipes-extended/screen | |
parent | c3f93357e2d3ece910ff0e2d18eba3fb94fb5c3c (diff) | |
download | openembedded-core-95618d6d5c4f8e5f0aec632d35e02ad5a33a1f75.tar.gz openembedded-core-95618d6d5c4f8e5f0aec632d35e02ad5a33a1f75.tar.bz2 openembedded-core-95618d6d5c4f8e5f0aec632d35e02ad5a33a1f75.zip |
screen: dynamically add or remove a entry to/from /etc/shells
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/screen')
-rw-r--r-- | meta/recipes-extended/screen/screen_4.0.3.bb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb index 1a7eb2031b..be42fb9eec 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 +} |