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:
committed by
Peter Korsgaard
parent
de846f6e04
commit
c4cdcc3680
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user