mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-26 04:36:33 +00:00
/etc/init.d/S00datapart: show fsck log only on errors
This commit is contained in:
parent
5c3c533966
commit
2bd433b154
@ -41,13 +41,18 @@ case "$1" in
|
|||||||
|
|
||||||
msg_done "${disk_dev}"
|
msg_done "${disk_dev}"
|
||||||
|
|
||||||
if [ -b ${data_dev} ]
|
if [[ -b ${data_dev} ]]; then
|
||||||
then
|
msg_begin "Checking data filesystem"
|
||||||
if grep -q 'fsck.mode=force' /proc/cmdline
|
if grep -q 'fsck.mode=force' /proc/cmdline; then
|
||||||
then
|
/sbin/e2fsck -fy ${data_dev} &> /tmp/fsck.log
|
||||||
/sbin/e2fsck -fy ${data_dev}
|
elif ! grep -q 'fsck.mode=skip' /proc/cmdline; then
|
||||||
|
/sbin/e2fsck -y ${data_dev} &> /tmp/fsck.log
|
||||||
|
fi
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
msg_done
|
||||||
else
|
else
|
||||||
/sbin/e2fsck -y ${data_dev}
|
msg_fail
|
||||||
|
cat /tmp/fsck.log
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user