Difference between revisions of "Scripting"

From VyOS Wiki
Jump to: navigation, search
Line 1: Line 1:
{{Migrated | url = https://vyos.readthedocs.io/en/latest/commandscripting.html}}
== Scripting ==
== Scripting ==

Latest revision as of 20:35, 1 July 2019

Warning sign.png This page is migrated to Readthedocs .
Information found on this page is migrated to readthedocs and information found here could be outdated or misleading. https://vyos.readthedocs.io/en/latest/commandscripting.html
For a complete status of all migrations, see Project:Migration


VyOS supports executing configuration and operational commands non-interactively from shell scripts:


The /config/scripts/vyatta-postconfig-bootup.scriptscript is called on boot after the VyOS configuration is fully applied.

Any modifications done to work around unfixed bugs and implement enhancements which are not complete in the VyOS system can be placed here.

In this example, the script performs igmp configuration that cannot be done through the CLI yet.

echo 0 > /sys/devices/virtual/net/br1/bridge/multicast_snooping
echo 0 > /sys/devices/virtual/net/br1/bridge/multicast_querier
echo 0 > /sys/devices/virtual/net/br1/bridge/multicast_router

For configuration/upgrade management issues, modification of this script should be the last option. Always try to find solutions based on CLI commands first.