modified on 18 May 2009 at 21:47 ••• 10,419 views

Manual Routes

From Ubiquiti Wiki

Jump to: navigation, search

Contents

How to add a static route

Author: Skyhook 16 May 2009
Contents: Add static route in AirOS

AirOS Manual Scripting

AirOS allow users to add scripts in the /etc/persistent directory of Ubiquiti device.
These scripts can modify configuration by starting additional services and more.

The standard scripts are:

/etc/persistent/rc.prestart
/etc/persistent/rc.poststart
/etc/persistent/rc.prestop
/etc/persistent/rc.poststop 

They are called before and after the standard boot and shutdown scripts start or stop services...

Add static route via script

  • Reboot devices to clean all static routes and access via SSH/Telnet to AirOS device
  • Create a script /etc/persistent/rc.poststart and write here commands to add static route
  • Make sure that /etc/persistent/rc.poststart are executable
  • Check if your script work fine running the command line: ./etc/persistent/rc.poststart
    note: the command now start with a "dot" = run the script!
  • Run the command: cfgmtd -w -p /etc/ to make persistent
  • Reboot and verify that all it's working...

Linux Script FAQ (for non Linux-guru ;-) )

For more info, visit this link Linux Script FAQ.