diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2005-09-27 21:35:38 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-09-27 21:35:38 +0000 |
commit | b5067af0bfa30f894bc4fed805aaee5f5c529b2b (patch) | |
tree | bdbfe0d6a9a190282e5385fc94b07ca891c08b57 /classes | |
parent | 953a2e110313237a8dc255641eb4f9667ccbf83f (diff) |
rootfs_ipk: Add a remove_init_link function to the rootfs_ipk oeclass. This is needed for the nokia770 which won't boot with /sbin/init as a symbolic link (and I'm told other machines have this problem).
Diffstat (limited to 'classes')
-rw-r--r-- | classes/rootfs_ipk.bbclass | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 062c957359..2880411c31 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -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 |