summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/initramfs/initramfs.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk
index e6d004e9b..30969a4c9 100644
--- a/fs/initramfs/initramfs.mk
+++ b/fs/initramfs/initramfs.mk
@@ -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