kirkwood: add support for Netgear Stora (MS2000/2110) NAS
[openwrt/openwrt.git] / target / linux / kirkwood / base-files / etc / uci-defaults / 04_storafan
1 #
2 # Copyright (C) 2021 OpenWrt.org
3 #
4
5 . /lib/functions.sh
6
7 board=$(board_name)
8
9 case "$board" in
10 netgear,stora)
11 # Set fan script execution in crontab
12 grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0
13
14 echo "# stora fan script runs every 5 minutes" >> /etc/crontabs/root
15 echo "*/5 * * * * /sbin/fan_ctrl.sh" >> /etc/crontabs/root
16
17 # Execute one time after initial flash (instead of waiting 5 min for cron)
18 /sbin/fan_ctrl.sh
19 ;;
20 esac
21
22 exit 0