summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-11-17 01:46:22 -0500
committerPeter Korsgaard <jacmet@sunsite.dk>2010-11-17 21:20:45 +0100
commitdde5b6830c7d53591cf7f52f9c433eed65c89f84 (patch)
treec376de0e4e2e5452a06046a2681170ad6a08ceff
parentf80fdd2a33aaeffb46bcbe41f8106eb0cb18c5b3 (diff)
downloadbuildroot-novena-dde5b6830c7d53591cf7f52f9c433eed65c89f84.tar.gz
buildroot-novena-dde5b6830c7d53591cf7f52f9c433eed65c89f84.zip
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 <vapier@gentoo.org> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--fs/initramfs/initramfs.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk
index dd6aa94ad..73122a841 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))