summaryrefslogtreecommitdiff
path: root/scripts/install/install-functions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-06 09:10:10 +0700
committerGitHub <noreply@github.com>2018-11-06 09:10:10 +0700
commit12fddd72207087e3a8f420e79a50c43c13749b74 (patch)
tree24283ddc6b0ea30753609c4161e9fa078634fca2 /scripts/install/install-functions
parent018860f21eb4151df5e0b719ad9b66331786ac4e (diff)
parent645875f060705d8e12235d5d444c9fc8d4a615fa (diff)
downloadvyatta-cfg-system-12fddd72207087e3a8f420e79a50c43c13749b74.tar.gz
vyatta-cfg-system-12fddd72207087e3a8f420e79a50c43c13749b74.zip
Merge pull request #82 from bswinnerton/support-nvme-in-installations
T967: Support NVMe drives in installer
Diffstat (limited to 'scripts/install/install-functions')
-rwxr-xr-xscripts/install/install-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index d241e040..d65a6c6c 100755
--- a/scripts/install/install-functions
+++ b/scripts/install/install-functions
@@ -151,7 +151,7 @@ get_drive_size () {
# Probe hardrives not shown in /proc/partitions by default
probe_drives () {
# Find drives that may not be in /proc/partitions since not mounted
- drive=$(ls /sys/block | grep '[hsv]d.')
+ drive=$(ls /sys/block | grep '[hsv]d.|nvme.')
# now exclude all drives that are read-only
for drive in $drive; do
@@ -176,7 +176,7 @@ select_drive () {
# the first grep pattern looks for devices named c0d0, hda, and sda.
drives=$(cat /proc/partitions | \
awk '{ if ($4!="name") { print $4 } }' | \
- egrep "c[0-9]d[0-9]$|[hsv]d[a-z]$" | \
+ egrep "c[0-9]d[0-9]$|[hsv]d[a-z]$|nvme[0-9]n[0-9]" | \
egrep -v "^$")
# take the first drive as the default