package/e2fsprogs: make /sbin/fsck available
authorMaxim Mikityanskiy <maxtram95@gmail.com>
Mon, 19 Jan 2015 16:14:08 +0000 (18:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 10 Jul 2015 17:34:21 +0000 (19:34 +0200)
systemd looks for fsck in /sbin, so make symlink:
/sbin/fsck -> /usr/sbin/fsck

[Thomas: add comment.]

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/e2fsprogs/e2fsprogs.mk

index e0c4ee26fd9299a679ceeddde4b18c9e0cfcd70d..053752102243efe092f89d8ba1b2a43ffe119390 100644 (file)
@@ -118,5 +118,14 @@ ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y)
 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK
 endif
 
+# systemd really wants to have fsck in /sbin
+define E2FSPROGS_TARGET_FSCK_SYMLINK
+       ln -sf ../usr/sbin/fsck $(TARGET_DIR)/sbin/fsck
+endef
+
+ifeq ($(BR2_PACKAGE_E2FSPROGS_FSCK),y)
+E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FSCK_SYMLINK
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))