]> code.ossystems Code Review - openembedded-core.git/commitdiff
Add post processing command for nokia770 to correct init problem
authorRichard Purdie <richard@openedhand.com>
Tue, 27 Sep 2005 21:52:21 +0000 (21:52 +0000)
committerRichard Purdie <richard@openedhand.com>
Tue, 27 Sep 2005 21:52:21 +0000 (21:52 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky@46 311d38ba-8fff-0310-9ca6-ca027cbcb966

openembedded/classes/rootfs_ipk.bbclass

index 062c95735939d1d71b3a0c600b2f118711021e48..2880411c31b95817d49849777f806f05c46a9394 100644 (file)
@@ -130,7 +130,16 @@ create_etc_timestamp() {
        date +%2m%2d%2H%2M%Y >${IMAGE_ROOTFS}/etc/timestamp
 }
 
-# export the zap_root_password and create_etc_timestamp
-EXPORT_FUNCTIONS zap_root_password create_etc_timestamp
+# Turn any symbolic /sbin/init link into a file
+remove_init_link () {
+       if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
+               LINKFILE=${IMAGE_ROOTFS}`readlink ${IMAGE_ROOTFS}/sbin/init`
+               rm ${IMAGE_ROOTFS}/sbin/init
+               cp $LINKFILE ${IMAGE_ROOTFS}/sbin/init
+       fi
+}
+
+# export the zap_root_password, create_etc_timestamp and remote_init_link
+EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link
 
 addtask rootfs before do_build after do_install