mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 19:56:35 +00:00
Automatically fsck data paritition on boot
By default this runs e2fsck on the data partition on boot before mounting. A forced fsck can be enabled by adding `fsck.mode=force` to /boot/cmdline.txt Moved from https://github.com/ccrisan/motioneyeos/pull/2464
This commit is contained in:
parent
301723acf5
commit
743d4c0b3e
@ -41,7 +41,16 @@ case "$1" in
|
|||||||
|
|
||||||
msg_done "${disk_dev}"
|
msg_done "${disk_dev}"
|
||||||
|
|
||||||
test -b ${data_dev} && exit 0
|
if [ -b ${data_dev} ]
|
||||||
|
then
|
||||||
|
if grep -q 'fsck.mode=force' /proc/cmdline
|
||||||
|
then
|
||||||
|
/sbin/e2fsck -fy ${data_dev}
|
||||||
|
else
|
||||||
|
/sbin/e2fsck -y ${data_dev}
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
msg_begin "Creating data partition"
|
msg_begin "Creating data partition"
|
||||||
data_start=$((DATA_OFFS * 2048))
|
data_start=$((DATA_OFFS * 2048))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user