weired bug
This commit is contained in:
parent
e1706506cc
commit
1c62338bd7
24
startup.sh
24
startup.sh
|
|
@ -118,11 +118,11 @@ set_lvm() {
|
||||||
|
|
||||||
i=1
|
i=1
|
||||||
_LVM_NAMES=()
|
_LVM_NAMES=()
|
||||||
_LVM_SIZES=()
|
LVM_SIZES=()
|
||||||
if [[ -z "$_PART_NUM" ]]; then
|
if [[ -z "$_PART_NUM" ]]; then
|
||||||
_PART_NUM=1
|
_PART_NUM=1
|
||||||
_LVM_NAMES+=("root")
|
_LVM_NAMES+=("root")
|
||||||
_LVM_SIZES+=("100%FREE")
|
LVM_SIZES+=("100%FREE")
|
||||||
# Stop loop if only 1 partition
|
# Stop loop if only 1 partition
|
||||||
i=2
|
i=2
|
||||||
fi
|
fi
|
||||||
|
|
@ -130,11 +130,10 @@ set_lvm() {
|
||||||
read -r -p "Enter $i partition name [like root]: " _LVM_NAME
|
read -r -p "Enter $i partition name [like root]: " _LVM_NAME
|
||||||
_LVM_NAMES+=("$_LVM_NAME")
|
_LVM_NAMES+=("$_LVM_NAME")
|
||||||
read -r -p "Enter $i partition size [like 25G, 200M]: " _LVM_SIZE
|
read -r -p "Enter $i partition size [like 25G, 200M]: " _LVM_SIZE
|
||||||
_LVM_SIZES+=("$_LVM_SIZE")
|
LVM_SIZES+=("$_LVM_SIZE")
|
||||||
i=$((i + 1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
IFS=" " read -r -a LVM_NAMES <<<"$(tr ' ' '\n' <<<"${_LVM_NAMES[@]}" | sort -u | tr '\n' ' ')"
|
IFS=" " read -r -a LVM_NAMES <<<"$(tr ' ' '\n' <<<"${_LVM_NAMES[@]}" | sort -u | tr '\n' ' ')"
|
||||||
IFS=" " read -r -a LVM_SIZES <<<"$(tr ' ' '\n' <<<"${_LVM_SIZES[@]}" | sort -u | tr '\n' ' ')"
|
|
||||||
set_option "LVM_VG" "$_VG"
|
set_option "LVM_VG" "$_VG"
|
||||||
set_option "LVM_PART_NUM" "$_PART_NUM"
|
set_option "LVM_PART_NUM" "$_PART_NUM"
|
||||||
set_option "LVM_NAMES" "(${LVM_NAMES[*]})"
|
set_option "LVM_NAMES" "(${LVM_NAMES[*]})"
|
||||||
|
|
@ -275,15 +274,14 @@ set_partion_layout() {
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
set_lvm
|
|
||||||
set_option "LVM" 1
|
set_option "LVM" 1
|
||||||
set_option "LUKS" 0
|
# just weired bug with set_option
|
||||||
|
set_lvm
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
set_lvm
|
set_lvm
|
||||||
set_option "LUKS" 1
|
set_option "LUKS" 1
|
||||||
set_option "LVM" 1
|
|
||||||
set_option "LUKS_PATH" "/dev/mapper/ROOT"
|
set_option "LUKS_PATH" "/dev/mapper/ROOT"
|
||||||
set_password "LUKS_PASSWORD"
|
set_password "LUKS_PASSWORD"
|
||||||
break
|
break
|
||||||
|
|
@ -596,9 +594,9 @@ make_choice() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
background_check
|
# background_check
|
||||||
# write_to_config
|
# # write_to_config
|
||||||
clear
|
# clear
|
||||||
logo
|
# logo
|
||||||
make_choice
|
# make_choice
|
||||||
# set_lvm
|
set_partion_layout
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue