summaryrefslogtreecommitdiff
path: root/scripts/install/install-functions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-12 16:46:31 +0100
committerDaniil Baturin <daniil@baturin.org>2018-11-12 16:46:31 +0100
commitf7b182fa0f007dfac0202d9ae9017185c110f2f4 (patch)
treec6fbfabbcf7296f0866e5bfec3db10c2cb1e46e9 /scripts/install/install-functions
parent299cb670e76bcb364c410e5df69ddd95c4cb12be (diff)
parentf68dda9d619ea74bed266122ac86604284e1a9e4 (diff)
downloadvyatta-cfg-system-f7b182fa0f007dfac0202d9ae9017185c110f2f4.tar.gz
vyatta-cfg-system-f7b182fa0f007dfac0202d9ae9017185c110f2f4.zip
Merge branch 'current' of https://github.com/vyos/vyatta-cfg-system into current
Diffstat (limited to 'scripts/install/install-functions')
-rwxr-xr-xscripts/install/install-functions7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index d241e040..c9f3642e 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,9 +176,12 @@ 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 "^$")
+ #this needs more testing to decide if better than above
+ #drives=$(lsblk -dn -o name -I8)
+
# take the first drive as the default
drv=$(echo $drives | /usr/bin/awk '{ print $1 }')