initramfs: Don't overwrite $(TARGET_DIR)/init if it exists

Closes #2443

Allow use of custom init scripts.

Signed-off-by: Simon Pasch <fpasch@googlemail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Simon Pasch
2010-08-29 23:32:33 +02:00
committed by Peter Korsgaard
parent de846f6e04
commit c4cdcc3680
2 changed files with 4 additions and 2 deletions

View File

@@ -13,8 +13,9 @@ INITRAMFS_TARGET:= #nothing
endif
define ROOTFS_INITRAMFS_INIT_SYMLINK
rm -f $(TARGET_DIR)/init
ln -s sbin/init $(TARGET_DIR)/init
if [ ! -e $(TARGET_DIR)/init ]; then \
ln -s sbin/init $(TARGET_DIR)/init; \
fi
endef
ROOTFS_INITRAMFS_PRE_GEN_HOOKS += ROOTFS_INITRAMFS_INIT_SYMLINK