From b0fd63195bec8bcfe1cc0a2a0f949911109426b5 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 9 Nov 2014 19:42:30 +0100 Subject: docs: examples/openwrt: support all handler commands via UCI --- doc/examples/openwrt/fastd.config | 10 ++++++++++ doc/examples/openwrt/fastd.init | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'doc/examples/openwrt') diff --git a/doc/examples/openwrt/fastd.config b/doc/examples/openwrt/fastd.config index 69e3b21..e2c6db6 100644 --- a/doc/examples/openwrt/fastd.config +++ b/doc/examples/openwrt/fastd.config @@ -90,6 +90,16 @@ config fastd sample_config # command to execute before the tunnel interface is set down; $1 will be the interface name (optional) # option down '' + # commands executed by fastd ($INTERFACE can be used for the interface name; optional) +# option on_pre_up '' +# option on_up '' +# option on_down '' +# option on_post_down '' +# option on_connect '' +# option on_establish '' +# option on_disestablish '' +# option on_verify '' + config peer sample_peer diff --git a/doc/examples/openwrt/fastd.init b/doc/examples/openwrt/fastd.init index 325ea12..25a3bb8 100644 --- a/doc/examples/openwrt/fastd.init +++ b/doc/examples/openwrt/fastd.init @@ -79,6 +79,14 @@ config_string_hide_ip_addresses='hide ip addresses $(yes_no "$value");' config_string_hide_mac_addresses='hide mac addresses $(yes_no "$value");' config_string_secure_handshakes='secure handshakes $(yes_no "$value");' config_string_packet_mark='packet mark $(guard_value "$value");' +config_string_on_pre_up='on pre-up $(escape_string "$value");' +config_string_on_up='on up $(escape_string "$value");' +config_string_on_down='on down $(escape_string "$value");' +config_string_on_post_down='on post-down $(escape_string "$value");' +config_string_on_connect='on connect $(escape_string "$value");' +config_string_on_establish='on establish $(escape_string "$value");' +config_string_on_disestablish='on disestablish $(escape_string "$value");' +config_string_on_verify='on verify $(escape_string "$value");' config_string_peer='peer $(escape_string "$value") {' config_string_peer_group='peer group $(escape_string "$value") {' @@ -234,7 +242,8 @@ generate_config() { append_options "$s" config \ config config_peer config_peer_dir bind method syslog_level mode interface mtu peer_limit \ - user group status_socket pmtu forward hide_ip_addresses hide_mac_addresses secure_handshakes packet_mark + user group status_socket pmtu forward hide_ip_addresses hide_mac_addresses secure_handshakes packet_mark \ + on_pre_up on_up on_down on_post_down on_connect on_establish on_disestablish on_verify config_get mode "$s" mode -- cgit v1.2.3