File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,10 @@ detect_or_create_partition() {
3232 local suffix
3333
3434 # Try both possible partition naming schemes (e.g., /dev/sda1 or /dev/nvme0n1p1)
35- part_disk=" "
3635 for suffix in " 1" " p1" ; do
3736 if [[ -e " ${disk_dev}${suffix} " ]]; then
3837 part_disk=" ${disk_dev}${suffix} "
39- mappername=" ${mappername }${suffix} "
38+ mappername=" ${DISK }${suffix} "
4039 log_info " Partition $part_disk already exists for device $disk_dev "
4140 return 0
4241 fi
@@ -65,8 +64,8 @@ detect_or_create_partition() {
6564 # Try both possible partition naming schemes
6665 for suffix in " 1" " p1" ; do
6766 part_disk=" ${disk_dev}${suffix} "
68- if [[ -e " $part_disk " ]]; then
69- mappername=" ${mappername }${suffix} "
67+ if [[ -e " $part_disk " ]]; then
68+ mappername=" ${DISK }${suffix} "
7069 log_info " Partition $part_disk successfully created on $disk_dev "
7170 return 0
7271 fi
130129
131130diskpath=" /dev/$DISK " # /dev/vda
132131part_disk=" "
133-
134- mappername=" ${disk} "
132+ mappername=" "
135133detect_or_create_partition " $diskpath " # assign part_disk and mappername
136134device_to_mount=" /dev/mapper/$mappername "
137135[ -e " $device_to_mount " ] && log_fatal " Mapper $device_to_mount already exists"
You can’t perform that action at this time.
0 commit comments