summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-08 11:59:20 +0200
committerErich Eckner <git@eckner.net>2019-04-08 11:59:20 +0200
commitf8fed7ba3c51369f1d1abc01b0569e91d18a83ca (patch)
tree61ef1f705bf83058a7c359057a906d67bcf0173d
parente495e47515bda44ee81a7323f5318e7f45aa042a (diff)
downloadkamikaze-fsck-f8fed7ba3c51369f1d1abc01b0569e91d18a83ca.tar.xz
kamikaze-fsck: do not read whole cache
-rwxr-xr-xkamikaze-fsck3
1 files changed, 2 insertions, 1 deletions
diff --git a/kamikaze-fsck b/kamikaze-fsck
index 6858a8a..c7e779d 100755
--- a/kamikaze-fsck
+++ b/kamikaze-fsck
@@ -28,7 +28,7 @@ touch "${tmp_dir}/faulty-inode"
while [ -f "${tmp_dir}/faulty-inode" ]; do
if [ -s "${tmp_dir}/faulty-inode" ]; then
- debugfs -w "$1" -R "$(cat "${tmp_dir}/faulty-inode")"
+ debugfs -w "$1" -R "$(uniq < "${tmp_dir}/faulty-inode")"
fi
rm "${tmp_dir}/faulty-inode"
@@ -57,6 +57,7 @@ while [ -f "${tmp_dir}/faulty-inode" ]; do
while pgrep -xf "e2fsck -f -y $1 -E no_optimize_extents,fixes_only -C 0"; do
sleep 1
done
+ break
fi
done
done