From 9e14244d84e1525808cecb586e6df93381dd6543 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Thu, 7 Jun 2018 23:31:37 +0200 Subject: T689: convert show disks with completion script to new script --- op-mode-definitions/show-disk.xml | 24 ++++++++++++++++++++++++ src/completion/list_disks.sh | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 op-mode-definitions/show-disk.xml create mode 100755 src/completion/list_disks.sh 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 @@ + + + + + + + Show status of disk device + + + + + + + + Show disk drive formatting + + ${vyos_op_scripts_dir}/show-disk-format.sh $3 + + + + + + + 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 }'