Added umount

This commit is contained in:
Eric Renfro 2024-08-04 17:11:02 -04:00
parent 61d35c513a
commit 9a1ea05dcb
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -199,7 +199,7 @@ function prepare_target() {
${cmd} mkdir -p /mnt/gentoo/swap
${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /mnt/gentoo/swap
if [[ "$SWAP" ]]; then
if [[ "$SWAP" && ! -f /mnt/gentoo/swap/hibernate.swp ]]; then
#${cmd} mkdir -p /mnt/gentoo/swap
#${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /mnt/gentoo/swap
${cmd} btrfs filesystem mkswapfile --size "$(get_hibernate_size)g" --uuid clear /mnt/gentoo/swap/hibernate.swp
@ -349,6 +349,20 @@ function install_mount() {
prepare_target
}
function install_umount() {
show_options
read -rsn1 -p"Unounting: To proceed, press enter to continue." proceed
echo
if [[ "$proceed" != "" ]]; then
echo "Aborting."
exit 1
fi
echo "Mounting Partitions on ${RootDisk}..."
umount -R /mnt/gentoo
}
function install_stage() {
show_options
@ -424,10 +438,14 @@ while [[ $# -gt 0 ]]; do
DEBUG=true
shift
;;
-m|--mount)
--mount)
INSTALL_MODE=mount
shift
;;
--umount)
INSTALL_MODE=umount
shift
;;
--stage)
INSTALL_MODE=stage
INSTALL_STAGE=$1
@ -477,6 +495,7 @@ else
case "$INSTALL_MODE" in
normal) install_prep;;
mount) install_mount;;
umount) install_umount;;
stage) install_stage;;
clean) install_cleanup;;
*)