Patchwork [meta-networking,4/5] ndisc6: chmod in do_install and remove unnecessary pkg_postinst

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Oct. 31, 2013, 6:29 a.m.
Message ID <1383200986-18674-4-git-send-email-Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/60861/
State Accepted, archived
Commit edd499dfdba1a944497185af67e307d5cef7ab9e
Headers show

Comments

Qi.Chen@windriver.com - Oct. 31, 2013, 6:29 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

We can use chmod to set the SUID bit for applications in the do_install
task. If we do so, the pkg_postinsts are no longer needed.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../recipes-support/ndisc6/ndisc6_1.0.2.bb         |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

Patch

diff --git a/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb b/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
index d753912..a958e37 100644
--- a/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
+++ b/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
@@ -49,14 +49,8 @@  servers through slateless IPv6 autoconfiguration."
 
 do_install_append () {
     rm -rf ${D}${localstatedir}
-}
-# Enable SUID bit for applications that need it
-pkg_postinst_${PN}-rltraceroute6 () {
-    chmod 4555 ${bindir}/rltraceroute6
-}
-pkg_postinst_${PN}-ndisc6 () {
-    chmod 4555 ${bindir}/ndisc6
-}
-pkg_postinst_${PN}-rdisc6 () {
-    chmod 4555 ${bindir}/rdisc6
+    # Enable SUID bit for applications that need it
+    chmod 4555 ${D}${bindir}/rltraceroute6
+    chmod 4555 ${D}${bindir}/ndisc6
+    chmod 4555 ${D}${bindir}/rdisc6
 }