1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 19:11:51 +00:00
openmptcprouter-feeds/openmptcprouter/files/etc/uci-defaults/2030-omr-fstab
Ycarus (Yannick Chabanois) 16dd1b400f Add check fs on each partition
2021-09-02 19:50:29 +02:00

17 lines
300 B
Bash
Executable file

#!/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