From: Mike Frysinger Date: Wed, 17 Nov 2010 06:46:22 +0000 (-0500) Subject: initramfs: fix init symlink creation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dde5b6830c7d53591cf7f52f9c433eed65c89f84;p=buildroot.git initramfs: fix init symlink creation The -e test will dereference the symlink, so if there is no /bin/init, we will constantly try to create the symlink. So rather than error on subsequent runs when the link exists, use the force flag to ln. Signed-off-by: Mike Frysinger Acked-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk index dd6aa94adf..73122a8411 100644 --- a/fs/initramfs/initramfs.mk +++ b/fs/initramfs/initramfs.mk @@ -8,7 +8,7 @@ define ROOTFS_INITRAMFS_INIT_SYMLINK if [ ! -e $(TARGET_DIR)/init ]; then \ - ln -s sbin/init $(TARGET_DIR)/init; \ + ln -sf sbin/init $(TARGET_DIR)/init; \ fi endef @@ -20,4 +20,4 @@ endef ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs -$(eval $(call ROOTFS_TARGET,initramfs)) \ No newline at end of file +$(eval $(call ROOTFS_TARGET,initramfs))