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

View file

@ -17,12 +17,6 @@ if [ "$(uci -q get rpcd.@rpcd[0].socket)" != "/var/run/ubus/ubus.sock" ]; then
EOF
fi
/sbin/block detect > /etc/config/fstab
uci -q batch <<-EOF >/dev/null
set fstab.@global[0].check_fs='1'
commit fstab
EOF
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && [ "$(uci -q get openmptcprouter.settings.scaling_governor)" != "performance" ] && {
# force CPU speed for RPI
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")