summaryrefslogtreecommitdiff
path: root/op-mode-definitions/force-netns.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-29 09:54:48 +0200
committerChristian Breunig <christian@breunig.cc>2023-05-29 09:54:48 +0200
commitfdd5b644ec566b75e58a45478c94364858ac053e (patch)
tree40c15494a656f2e8d999869570cb153d6a516199 /op-mode-definitions/force-netns.xml.in
parentcfe369180686604b4153d6faa936e7e1a858d30d (diff)
downloadvyos-1x-fdd5b644ec566b75e58a45478c94364858ac053e.tar.gz
vyos-1x-fdd5b644ec566b75e58a45478c94364858ac053e.zip
T5234: add op-mode command "force netns" to change shell into any given namespace
Diffstat (limited to 'op-mode-definitions/force-netns.xml.in')
-rw-r--r--op-mode-definitions/force-netns.xml.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/op-mode-definitions/force-netns.xml.in b/op-mode-definitions/force-netns.xml.in
new file mode 100644
index 000000000..b9dc2c1e8
--- /dev/null
+++ b/op-mode-definitions/force-netns.xml.in
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="force">
+ <children>
+ <tagNode name="netns">
+ <properties>
+ <help>Execute shell in given Network Namespace</help>
+ <completionHelp>
+ <path>netns name</path>
+ </completionHelp>
+ </properties>
+ <command>sudo ip netns exec $3 su - $(whoami)</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>