Patchwork [v2] rootfs_ipk bbclass: special-case base-passwd preinst to run first

login
register
mail settings
Submitter Koen Kooi
Date Nov. 4, 2011, 9:38 a.m.
Message ID <1320399533-25156-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/14257/
State New, archived
Headers show

Comments

Koen Kooi - Nov. 4, 2011, 9:38 a.m.
Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/classes/rootfs_ipk.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index e02b816..47c4f94 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -77,6 +77,12 @@  fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTINSTALL_COMMAND}
 	
 	runtime_script_required=0
+
+	# Base-passwd needs to run first to install /etc/passwd and friends
+	if [ -e ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst ] ; then
+		sh ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst; then
+	fi
+
 	for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
 		if [ -f $i ] && ! sh $i; then
 		     	runtime_script_required=1