diff options
-rw-r--r-- | op-mode-definitions/show-disk.xml | 24 | ||||
-rwxr-xr-x | src/completion/list_disks.sh | 5 |
2 files changed, 29 insertions, 0 deletions
diff --git a/op-mode-definitions/show-disk.xml b/op-mode-definitions/show-disk.xml new file mode 100644 index 000000000..243a3656a --- /dev/null +++ b/op-mode-definitions/show-disk.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="show"> + <children> + <tagNode name="disk"> + <properties> + <help>Show status of disk device</help> + <completionHelp> + <script>${vyos_completion_dir}/list_disks.sh</script> + </completionHelp> + </properties> + <children> + <node name="format"> + <properties> + <help>Show disk drive formatting</help> + </properties> + <command>${vyos_op_scripts_dir}/show-disk-format.sh $3</command> + </node> + </children> + </tagNode> + + </children> + </node> +</interfaceDefinition> diff --git a/src/completion/list_disks.sh b/src/completion/list_disks.sh new file mode 100755 index 000000000..f32e558fd --- /dev/null +++ b/src/completion/list_disks.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Completion script used by show disks to collect physical disk + +awk 'NR > 2 && $4 !~ /[0-9]$/ { print $4 }' </proc/partitions |