mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
rename ASK_MOUNTPOINT to CREATE_MOUNTPOINT
This commit is contained in:
parent
599852589c
commit
4929a39cd2
3 changed files with 14 additions and 14 deletions
|
@ -202,7 +202,7 @@ _prepare_storagedrive() {
|
||||||
[[ "${_S_MKFSAUTO}" = "1" ]] && _DONE=1
|
[[ "${_S_MKFSAUTO}" = "1" ]] && _DONE=1
|
||||||
case $(cat ${_ANSWER}) in
|
case $(cat ${_ANSWER}) in
|
||||||
"1")
|
"1")
|
||||||
_ASK_MOUNTPOINTS=1
|
_CREATE_MOUNTPOINTS=1
|
||||||
_autoprepare
|
_autoprepare
|
||||||
[[ "${_S_MKFSAUTO}" = "1" ]] && _DONE=1
|
[[ "${_S_MKFSAUTO}" = "1" ]] && _DONE=1
|
||||||
;;
|
;;
|
||||||
|
@ -212,7 +212,7 @@ _prepare_storagedrive() {
|
||||||
_create_special ;;
|
_create_special ;;
|
||||||
"4")
|
"4")
|
||||||
_DEVFINISH=""
|
_DEVFINISH=""
|
||||||
_ASK_MOUNTPOINTS=1
|
_CREATE_MOUNTPOINTS=1
|
||||||
_mountpoints ;;
|
_mountpoints ;;
|
||||||
*)
|
*)
|
||||||
_DONE=1 ;;
|
_DONE=1 ;;
|
||||||
|
|
|
@ -185,7 +185,7 @@ _check_btrfs_subvolume(){
|
||||||
_dialog --msgbox "ERROR: You have defined an empty name!\nPlease enter another name." 6 50
|
_dialog --msgbox "ERROR: You have defined an empty name!\nPlease enter another name." 6 50
|
||||||
_BTRFS_SUBVOLUME="NONE"
|
_BTRFS_SUBVOLUME="NONE"
|
||||||
fi
|
fi
|
||||||
if [[ -z "${_DETECT_CREATE_FILESYSTEM}" && -z "${_ASK_MOUNTPOINTS}" ]]; then
|
if [[ -z "${_DETECT_CREATE_FILESYSTEM}" && -z "${_CREATE_MOUNTPOINTS}" ]]; then
|
||||||
_mount_btrfs
|
_mount_btrfs
|
||||||
for i in $(btrfs subvolume list "${_BTRFSMP}" | cut -d " " -f 9); do
|
for i in $(btrfs subvolume list "${_BTRFSMP}" | cut -d " " -f 9); do
|
||||||
if echo "${i}" | grep -q "${_BTRFS_SUBVOLUME}"; then
|
if echo "${i}" | grep -q "${_BTRFS_SUBVOLUME}"; then
|
||||||
|
@ -240,7 +240,7 @@ _choose_btrfs_subvolume () {
|
||||||
|
|
||||||
# btrfs subvolume menu
|
# btrfs subvolume menu
|
||||||
_btrfs_subvolume() {
|
_btrfs_subvolume() {
|
||||||
if [[ "${_FSTYPE}" == "btrfs" && -z "${_ASK_MOUNTPOINTS}" ]]; then
|
if [[ "${_FSTYPE}" == "btrfs" && -z "${_CREATE_MOUNTPOINTS}" ]]; then
|
||||||
_choose_btrfs_subvolume || return 1
|
_choose_btrfs_subvolume || return 1
|
||||||
else
|
else
|
||||||
if [[ -n "${_SKIP_FILESYSTEM}" && -z ${_DETECT_CREATE_FILESYSTEM}"" ]]; then
|
if [[ -n "${_SKIP_FILESYSTEM}" && -z ${_DETECT_CREATE_FILESYSTEM}"" ]]; then
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# check if _ROOTDEV is set and if something is mounted on ${_DESTDIR}
|
# check if _ROOTDEV is set and if something is mounted on ${_DESTDIR}
|
||||||
_destdir_mounts(){
|
_destdir_mounts(){
|
||||||
# Don't ask for filesystem and create new filesystems
|
# Don't ask for filesystem and create new filesystems
|
||||||
_ASK_MOUNTPOINTS=""
|
_CREATE_MOUNTPOINTS=""
|
||||||
_ROOTDEV=""
|
_ROOTDEV=""
|
||||||
# check if something is mounted on ${_DESTDIR}
|
# check if something is mounted on ${_DESTDIR}
|
||||||
_ROOTDEV="$(mount | grep "${_DESTDIR} " | cut -d' ' -f 1)"
|
_ROOTDEV="$(mount | grep "${_DESTDIR} " | cut -d' ' -f 1)"
|
||||||
|
@ -65,7 +65,7 @@ _enter_mountpoint() {
|
||||||
if [[ -z "${_SWAP_DONE}" ]]; then
|
if [[ -z "${_SWAP_DONE}" ]]; then
|
||||||
_MP="swap"
|
_MP="swap"
|
||||||
# create swap if not already swap formatted
|
# create swap if not already swap formatted
|
||||||
if [[ -n "${_ASK_MOUNTPOINTS}" && ! "${_FSTYPE}" == "swap" ]]; then
|
if [[ -n "${_CREATE_MOUNTPOINTS}" && ! "${_FSTYPE}" == "swap" ]]; then
|
||||||
_DOMKFS=1
|
_DOMKFS=1
|
||||||
_FSTYPE="swap"
|
_FSTYPE="swap"
|
||||||
fi
|
fi
|
||||||
|
@ -187,8 +187,8 @@ _mountpoints() {
|
||||||
if [[ -z "${_SWAP_DONE}" && "${_FSTYPE}" == "swap" ]] || [[ "${_DEV}" == "NONE" ]]; then
|
if [[ -z "${_SWAP_DONE}" && "${_FSTYPE}" == "swap" ]] || [[ "${_DEV}" == "NONE" ]]; then
|
||||||
_SKIP_FILESYSTEM=1
|
_SKIP_FILESYSTEM=1
|
||||||
fi
|
fi
|
||||||
# _ASK_MOUNTPOINTS switch for create filesystem and only mounting filesystem
|
# _CREATE_MOUNTPOINTS switch for create filesystem and only mounting filesystem
|
||||||
if [[ -n "${_ASK_MOUNTPOINTS}" ]]; then
|
if [[ -n "${_CREATE_MOUNTPOINTS}" ]]; then
|
||||||
_MP_DONE=1
|
_MP_DONE=1
|
||||||
# reformat device, if already swap partition format
|
# reformat device, if already swap partition format
|
||||||
if [[ "${_FSTYPE}" == "swap" && -n "${_SWAP_DONE}" ]]; then
|
if [[ "${_FSTYPE}" == "swap" && -n "${_SWAP_DONE}" ]]; then
|
||||||
|
@ -254,8 +254,8 @@ _mountpoints() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "${_DEV}" != "DONE" ]]; then
|
if [[ "${_DEV}" != "DONE" ]]; then
|
||||||
# _ASK_MOUNTPOINTS switch for create filesystem and only mounting filesystem
|
# _CREATE_MOUNTPOINTS switch for create filesystem and only mounting filesystem
|
||||||
if [[ -n "${_ASK_MOUNTPOINTS}" && -z "${_SKIP_FILESYSTEM}" ]]; then
|
if [[ -n "${_CREATE_MOUNTPOINTS}" && -z "${_SKIP_FILESYSTEM}" ]]; then
|
||||||
_enter_mountpoint || return 1
|
_enter_mountpoint || return 1
|
||||||
_create_filesystem || return 1
|
_create_filesystem || return 1
|
||||||
else
|
else
|
||||||
|
@ -275,7 +275,7 @@ _mountpoints() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#shellcheck disable=SC2028
|
#shellcheck disable=SC2028
|
||||||
if [[ -n "${_ASK_MOUNTPOINTS}" ]]; then
|
if [[ -n "${_CREATE_MOUNTPOINTS}" ]]; then
|
||||||
_MOUNT_TEXT="create and mount"
|
_MOUNT_TEXT="create and mount"
|
||||||
else
|
else
|
||||||
_MOUNT_TEXT="mount"
|
_MOUNT_TEXT="mount"
|
||||||
|
@ -415,19 +415,19 @@ _mkfs() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# check if /boot exists on ROOT DEVICE
|
# check if /boot exists on ROOT DEVICE
|
||||||
if [[ -z "${_ASK_MOUNTPOINTS}" && "${5}" = "/" && ! -d "${3}${5}/boot" ]]; then
|
if [[ -z "${_CREATE_MOUNTPOINTS}" && "${5}" = "/" && ! -d "${3}${5}/boot" ]]; then
|
||||||
_dialog --msgbox "Error: ROOT DEVICE ${3}${5} does not contain /boot directory." 0 0
|
_dialog --msgbox "Error: ROOT DEVICE ${3}${5} does not contain /boot directory." 0 0
|
||||||
_umountall
|
_umountall
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# check on /EFI on /efi mountpoint
|
# check on /EFI on /efi mountpoint
|
||||||
if [[ -z "${_ASK_MOUNTPOINTS}" && "${5}" = "/efi" && ! -d "${3}${5}/EFI" ]]; then
|
if [[ -z "${_CREATE_MOUNTPOINTS}" && "${5}" = "/efi" && ! -d "${3}${5}/EFI" ]]; then
|
||||||
_dialog --msgbox "Error: EFI SYSTEM PARTITION (ESP) ${3}${5} does not contain /EFI directory." 0 0
|
_dialog --msgbox "Error: EFI SYSTEM PARTITION (ESP) ${3}${5} does not contain /EFI directory." 0 0
|
||||||
_umountall
|
_umountall
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# check on /EFI on /boot
|
# check on /EFI on /boot
|
||||||
if [[ -z "${_ASK_MOUNTPOINTS}" && "${5}" = "/boot" && -n "${_UEFI_BOOT}" && ! $(mountpoint /efi > "${_NO_LOG}") && ! -d "${3}${5}/EFI" ]]; then
|
if [[ -z "${_CREATE_MOUNTPOINTS}" && "${5}" = "/boot" && -n "${_UEFI_BOOT}" && ! $(mountpoint /efi > "${_NO_LOG}") && ! -d "${3}${5}/EFI" ]]; then
|
||||||
_dialog --msgbox "Error: EFI SYSTEM PARTITION (ESP) ${3}${5} does not contain /EFI directory." 0 0
|
_dialog --msgbox "Error: EFI SYSTEM PARTITION (ESP) ${3}${5} does not contain /EFI directory." 0 0
|
||||||
_umountall
|
_umountall
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue