diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-08-15 00:14:07 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-08-16 08:12:58 -0400 |
commit | d557650872cff705db51dfdb0e2e440c4f52bbc7 (patch) | |
tree | 0d71c227cd5238954ad3862c15c57cef22c251ac | |
parent | df2a8526000333c6c1b672da577e96adce3522d8 (diff) |
consolidate umount calls
-rwxr-xr-x | install.sh | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -386,13 +386,15 @@ SelectEnv() [[ -n "${language}" ]] && SetStateVar 'LANG' ${language} || exit } -SelectPartition() +_UmountAll() { - # prepare for partition probe umount /mnt/boot &> /dev/null || true umount /mnt/home &> /dev/null || true umount /mnt &> /dev/null || true +} +SelectPartition() +{ # checks to skip this stage per preset config [[ -z "$(GetStateVar 'DEVICE_N' )" ]] || [[ -z "$(GetStateVar 'DEVICE' )" ]] || @@ -408,6 +410,8 @@ SelectPartition() else return 0 fi + _UmountAll + # query disk device information PopulateDisksOptions # populates $DlgParams (( ${#DlgParams[@]} )) || ExitFail "${TR[device_none-${Lang}]}" @@ -466,6 +470,8 @@ _PartitionAuto() local swap_type_n=82 SetStateVar 'ROOT_PART' ${device}${root_part_n} + _UmountAll + # create partition table parted -s ${device} -- mklabel msdos @@ -491,6 +497,8 @@ _PartitionManual() [[ -n "$(GetStateVar 'DEVICE' )" ]] [[ -n "$(GetStateVar 'DEVICE_N')" ]] + _UmountAll + # manual partitioning local device=$(GetStateVar 'DEVICE') if [[ -n "${DISPLAY}" ]] && which gparted &> /dev/null ; then gparted ${device} ; |