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

Add check fs on each partition

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-09-02 19:50:29 +02:00
parent 9719abac16
commit 16dd1b400f
2 changed files with 17 additions and 6 deletions

View file

@ -0,0 +1,17 @@
#!/bin/sh
. /lib/functions.sh
_set_fsck() {
uci -q batch <<-EOF >/dev/null
set "fstab.$1.enabled=1"
set "fstab.$1.enable_fsck=1"
EOF
}
/sbin/block detect > /etc/config/fstab
uci -q set fstab.@global[0].check_fs='1'
config_load fstab
config_foreach _set_fsck mount
uci -q commit fstab
exit 0