1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Try to check FS on boot

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-07-11 19:45:41 +02:00
parent 1315e45f7c
commit 496ef2073e

View file

@ -17,5 +17,8 @@ do_mount_root() {
tar xzf sysupgrade.tgz
}
}
[ -n "$(mount | grep ext4 | grep ro)" ] && {
[ -e /dev/mmcblk0p2 ] && /usr/sbin/e2fsck -y -v -f /dev/mmcblk0p2 >/dev/null 2>&1
[ -e /dev/sda2 ] && /usr/sbin/e2fsck -y -v -f /dev/sda2 >/dev/null 2>&1
}
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root