aredn/files/etc/uci-defaults/12_mikrotik_boot

12 lines
416 B
Plaintext
Raw Normal View History

#! /bin/sh
#
# On Mikrotik devices, make sure the boot mode is 'flasheth' otherwise
# the node can fail to boot.
#
if [ -f /sys/firmware/mikrotik/soft_config/boot_device ]; then
if [ "$(grep '\[flasheth\]' /sys/firmware/mikrotik/soft_config/boot_device)" = "" ]; then
echo "flasheth" > /sys/firmware/mikrotik/soft_config/boot_device
echo "1" > /sys/firmware/mikrotik/soft_config/commit
fi
fi