Browse Source

修复块设备判断

杨振 4 years ago
parent
commit
38736532f6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ubiquity/usr/lib/ubiquity/user-setup/user-setup-apply

+ 1 - 1
ubiquity/usr/lib/ubiquity/user-setup/user-setup-apply

@@ -470,7 +470,7 @@ add_fstab() {
 DATA_DISK=$(LANG=en;fdisk -l | grep "Disk /dev" | awk -F '[ :]' '{ if($6 > 800*1024*1024*1024) print $2 }' | head -n 1)
 echo "DATA_DISK=${DATA_DISK}" >> /tmp/part.log
 
-if [ -b ${DATA_DISK} ]; then
+if [ -b "${DATA_DISK}" ]; then
   # 平均分为两个分区
   parted -s ${DATA_DISK} mktable gpt
   parted -s ${DATA_DISK} mkpart primary ext4 1 50%