From f62b6e1986b815a1e05dff94e7298deab5e433b5 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 27 Feb 2012 13:42:15 -0500 Subject: install/fsck: use fsck.ext4 for ext[234] e2fsprogs makes a lot of hardlinks for its fsck tools. If ext[234] is detected, add the fsck.ext4 binary and add symlinks. Signed-off-by: Dave Reisner --- install/fsck | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install/fsck b/install/fsck index 9d9943b..b820063 100644 --- a/install/fsck +++ b/install/fsck @@ -3,12 +3,22 @@ build() { local added=0 + add_fsck() { + if [[ $1 = ext[234] ]]; then + add_binary fsck.ext4 + add_symlink /usr/bin/fsck.ext2 fsck.ext4 + add_symlink /usr/bin/fsck.ext3 fsck.ext4 + else + add_binary "fsck.$1" + fi + } + if (( ! fs_autodetect_failed )) && [[ $rootfstype$usrfstype ]]; then if [[ $rootfstype ]]; then - add_binary fsck.$rootfstype && (( ++added )) + add_fsck $rootfstype && (( ++added )) fi if [[ $usrfstype && $usrfstype != $rootfstype ]]; then - add_binary fsck.$usrfstype && (( ++added )) + add_fsck $usrfstype && (( ++added )) fi else for fsck in "$BASEDIR"/sbin/fsck.*; do -- cgit v1.2.3-24-g4f1b