From 0ec349fbf4156dcdbef3a7e2e35002acc1db34d8 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Sat, 22 Feb 2020 23:38:17 -0600 Subject: [PATCH] Fix bug in fsck check --- rootfs/standard/usr/bin/mynode_startup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 3408edee..5c6b339a 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -65,8 +65,9 @@ set +e touch /tmp/repairing_drive for d in /dev/sd*1; do echo "Repairing drive $d ..."; - RC=$(fsck -y $d > /tmp/fsck_results 2>&1) - if [ $RC -ne 0 ]; then + fsck -y $d > /tmp/fsck_results 2>&1 + RC=$? + if [ "$RC" -ne 0 ]; then touch /tmp/fsck_error fi done