summaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-02-28 13:33:01 +0100
committerDaniil Baturin <daniil@baturin.org>2018-02-28 13:33:01 +0100
commit65e2de337585ccec068ae7a97a824b7f6c558e26 (patch)
tree6b6cc31c3faa37748009e948a80b8d217bac3fbf /scripts/install
parentd8dd509656e24d0050050ed067021e4b45e07d59 (diff)
parent42b06c04970392d7f2df8fdbcfa9345cfab95f33 (diff)
downloadvyatta-cfg-system-65e2de337585ccec068ae7a97a824b7f6c558e26.tar.gz
vyatta-cfg-system-65e2de337585ccec068ae7a97a824b7f6c558e26.zip
Merge branch 'current' of github.com:vyos/vyatta-cfg-system into current
Diffstat (limited to 'scripts/install')
-rwxr-xr-xscripts/install/install-get-partition7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index f1b373ae..a8590031 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -688,7 +688,12 @@ create_partitions() {
lecho "Creating root partition on /dev/$ldrive"
# Make the root partition
- output=$(parted --script --align optimal /dev/$ldrive mkpart primary 0% $root_part_size)
+ # if optimal_io_size is empty use default of 2048s
+ if [ $(cat /sys/block/$ldrive/queue/optimal_io_size) -gt 0 ]; then
+ output=$(parted --script --align optimal /dev/$ldrive mkpart primary 0% $root_part_size)
+ else
+ output=$(parted --script --align optimal /dev/$ldrive mkpart primary 2048s $root_part_size)
+ fi
status=$?
if [ "$status" != 0 ]; then
echo -e "Error creating primary partition on $ldrive.\nPlease see $INSTALL_LOG for more details.\nExiting..."