summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-30 17:09:43 +0200
committerGitHub <noreply@github.com>2024-07-30 17:09:43 +0200
commit40dd6b7ca9c6269a1b3647bef4a4b597783f3b36 (patch)
treefbd68dc5c960dfcec4724cee9d971585f5c7f1fd /op-mode-definitions
parent0dc8b5899e05231850fee3461545305bd7ba3862 (diff)
parent1ce6c77eb37c9519c8e970eafc210c4f6533f55b (diff)
downloadvyos-1x-40dd6b7ca9c6269a1b3647bef4a4b597783f3b36.tar.gz
vyos-1x-40dd6b7ca9c6269a1b3647bef4a4b597783f3b36.zip
Merge pull request #3911 from vyos/mergify/bp/circinus/pr-3698
system: op-mode: T3334: allow delayed getty restart when configuring serial ports (backport #3698)
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/restart-serial.xml.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/op-mode-definitions/restart-serial.xml.in b/op-mode-definitions/restart-serial.xml.in
new file mode 100644
index 000000000..4d8a03633
--- /dev/null
+++ b/op-mode-definitions/restart-serial.xml.in
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="serial">
+ <properties>
+ <help>Restart services on serial ports</help>
+ </properties>
+ <children>
+ <node name="console">
+ <properties>
+ <help>Restart serial console service for login TTYs</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/serial.py restart_console</command>
+ <children>
+ <tagNode name="device">
+ <properties>
+ <help>Restart specific TTY device</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_login_ttys.py</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/serial.py restart_console --device-name "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>