@@ -33,9 +33,9 @@ function extension_prepare_config__prepare_lvm() {
3333
3434function post_create_partitions__setup_lvm() {
3535 # Setup LVM on the partition, ROOTFS
36- parted -s ${SDCARD} .raw -- set ${rootpart} lvm on
36+ parted -s " ${SDCARD} .raw" -- set " ${rootpart} " lvm on
3737 display_alert " LVM Partition table created" " ${EXTENSION} " " info"
38- parted -s ${SDCARD} .raw -- print >> " ${DEST} " /${LOG_SUBPATH} /lvm.log 2>&1
38+ parted -s " ${SDCARD} .raw" -- print >> " ${DEST} /${LOG_SUBPATH} /lvm.log" 2>&1
3939}
4040
4141function prepare_root_device__create_volume_group() {
@@ -52,25 +52,25 @@ function prepare_root_device__create_volume_group() {
5252
5353 # Create the PV VG and VOL
5454 display_alert " LVM Creating VG" " ${rootdevice} " " info"
55- check_loop_device ${rootdevice}
56- pvcreate ${rootdevice}
55+ check_loop_device " ${rootdevice} "
56+ pvcreate " ${rootdevice} "
5757 wait_for_disk_sync " wait for pvcreate to sync"
58- vgcreate ${LVM_VG_NAME} ${rootdevice}
58+ vgcreate " ${LVM_VG_NAME} " " ${rootdevice} "
5959 add_cleanup_handler cleanup_lvm
6060 wait_for_disk_sync " wait for vgcreate to sync"
6161 # Note that devices wont come up automatically inside docker
62- lvcreate -Zn --name root --size ${volsize} M ${LVM_VG_NAME}
62+ lvcreate -Zn --name root --size " ${volsize} M" " ${LVM_VG_NAME} "
6363 vgmknodes
64- lvs >> " ${DEST} " /${LOG_SUBPATH} /lvm.log 2>&1
65-
66- rootdevice=/dev/mapper/${LVM_VG_NAME} -root
64+ lvs >> " ${DEST} /${LOG_SUBPATH} /lvm.log" 2>&1
65+
66+ rootdevice=" /dev/mapper/${LVM_VG_NAME} -root"
6767 display_alert " LVM created volume group - root device ${rootdevice} " " ${EXTENSION} " " info"
6868}
6969
7070function format_partitions__format_lvm() {
7171 # Label the root volume
72- e2label /dev/mapper/${LVM_VG_NAME} -root armbi_root
73- blkid | grep ${LVM_VG_NAME} >> " ${DEST} " /${LOG_SUBPATH} /lvm.log 2>&1
72+ e2label " /dev/mapper/${LVM_VG_NAME} -root" armbi_root
73+ blkid | grep " ${LVM_VG_NAME} " >> " ${DEST} /${LOG_SUBPATH} /lvm.log" 2>&1
7474 display_alert " LVM labeled partitions" " ${EXTENSION} " " info"
7575}
7676
@@ -79,6 +79,6 @@ function post_umount_final_image__cleanup_lvm(){
7979}
8080
8181function cleanup_lvm() {
82- vgchange -a n ${LVM_VG_NAME} >> " ${DEST} " /${LOG_SUBPATH} /lvm.log 2>&1 || true
82+ vgchange -a n " ${LVM_VG_NAME} " >> " ${DEST} /${LOG_SUBPATH} /lvm.log" 2>&1 || true
8383 display_alert " LVM deactivated volume group" " ${EXTENSION} " " info"
8484}
0 commit comments