diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-02-27 19:42:15 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-03-03 03:59:08 +0100 |
commit | f62b6e1986b815a1e05dff94e7298deab5e433b5 (patch) | |
tree | 87961dbf4ce87203285770dab6e5c86b13ee4792 /install | |
parent | 1d67d47b66429a8acae14bd361c1d2ca949832b9 (diff) | |
download | mkinitcpio-f62b6e1986b815a1e05dff94e7298deab5e433b5.tar.gz mkinitcpio-f62b6e1986b815a1e05dff94e7298deab5e433b5.tar.xz |
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 <dreisner@archlinux.org>
Diffstat (limited to 'install')
-rw-r--r-- | install/fsck | 14 |
1 files 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 |