summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Swinnerton <bswinnerton@gmail.com>2018-11-05 20:59:49 -0500
committerBrooks Swinnerton <bswinnerton@gmail.com>2018-11-05 20:59:49 -0500
commit7b7136592a921f2a3bdc75b483429687e244722c (patch)
tree227692b190c1a9e412c8d91f4807c4c6370f372d
parentfe1aea4a643225f573f90f00625116ead86fc89b (diff)
downloadvyatta-cfg-system-7b7136592a921f2a3bdc75b483429687e244722c.tar.gz
vyatta-cfg-system-7b7136592a921f2a3bdc75b483429687e244722c.zip
T967: Include nvme drives when selecting drive
I had a difficult time finding a canonical source of device name formatting in Linux (was hoping for an RFC), but this should be pretty close to reality. NVMe drives are typically named as so: - nvme0: first registered device's device controller - nvme0n1: first registered device's first namespace - nvme0n1p1: first registered device's first namespace's first partition
-rwxr-xr-xscripts/install/install-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index afda4d91..d65a6c6c 100755
--- a/scripts/install/install-functions
+++ b/scripts/install/install-functions
@@ -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