From f2cc87a259df1d2ab4d0a7eb366224a238422048 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 2 Aug 2020 19:36:39 +0200 Subject: op-mode: use individual XML files for connect and disconnect --- op-mode-definitions/connect-disconnect.xml | 46 ------------------------------ op-mode-definitions/connect.xml | 29 +++++++++++++++++++ op-mode-definitions/disconnect.xml | 20 +++++++++++++ 3 files changed, 49 insertions(+), 46 deletions(-) delete mode 100644 op-mode-definitions/connect-disconnect.xml create mode 100644 op-mode-definitions/connect.xml create mode 100644 op-mode-definitions/disconnect.xml diff --git a/op-mode-definitions/connect-disconnect.xml b/op-mode-definitions/connect-disconnect.xml deleted file mode 100644 index ea2883e0b..000000000 --- a/op-mode-definitions/connect-disconnect.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Establish connection - - - - - Connect to device attached to serial console server - - service console-server device - - - /usr/bin/console "$3" - - - - Bring up a connection-oriented network interface - - interfaces pppoe - interfaces wirelessmodem - - - sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect "$3" - - - - - - Take down a connection - - - - - Take down a connection-oriented network interface - - interfaces pppoe - interfaces wirelessmodem - - - sudo ${vyos_op_scripts_dir}/connect_disconnect.py --disconnect "$3" - - - - diff --git a/op-mode-definitions/connect.xml b/op-mode-definitions/connect.xml new file mode 100644 index 000000000..1ec62949a --- /dev/null +++ b/op-mode-definitions/connect.xml @@ -0,0 +1,29 @@ + + + + + Establish connection + + + + + Connect to device attached to serial console server + + service console-server device + + + /usr/bin/console "$3" + + + + Bring up a connection-oriented network interface + + interfaces pppoe + interfaces wirelessmodem + + + sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect "$3" + + + + diff --git a/op-mode-definitions/disconnect.xml b/op-mode-definitions/disconnect.xml new file mode 100644 index 000000000..bf2c37b89 --- /dev/null +++ b/op-mode-definitions/disconnect.xml @@ -0,0 +1,20 @@ + + + + + Take down a connection + + + + + Take down a connection-oriented network interface + + interfaces pppoe + interfaces wirelessmodem + + + sudo ${vyos_op_scripts_dir}/connect_disconnect.py --disconnect "$3" + + + + -- cgit v1.2.3