Search code examples
openwrt

OpenWRT print to console in preinit scripts


Does anybody know how to print out the message inside the OpenWRT preinit scripts? I tried with echo but all messages are suppressed.


Solution

  • Use preinit_echo and preinit_net_echo to output to the connected console. Use both, to cover both a local and a networked console, like:

    preinit_echo "Message here"
    preinit_net_echo "Message here"
    

    (For discussion, see comments on OP.)