Skip to content

Commit

Permalink
Merge remote-tracking branch 'thingos/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Oct 25, 2020
2 parents 1eaa358 + 2bd433b commit d897bfc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion board/common/overlay/etc/init.d/S00datapart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,21 @@ case "$1" in

msg_done "${disk_dev}"

test -b ${data_dev} && exit 0
if [[ -b ${data_dev} ]]; then
msg_begin "Checking data filesystem"
if grep -q 'fsck.mode=force' /proc/cmdline; then
/sbin/e2fsck -fy ${data_dev} &> /tmp/fsck.log
elif ! grep -q 'fsck.mode=skip' /proc/cmdline; then
/sbin/e2fsck -y ${data_dev} &> /tmp/fsck.log
fi
if [[ $? == 0 ]]; then
msg_done
else
msg_fail
cat /tmp/fsck.log
fi
exit 0
fi

msg_begin "Creating data partition"
data_start=$((DATA_OFFS * 2048))
Expand Down

0 comments on commit d897bfc

Please sign in to comment.