Added umount
This commit is contained in:
parent
61d35c513a
commit
9a1ea05dcb
1 changed files with 21 additions and 2 deletions
|
@ -199,7 +199,7 @@ function prepare_target() {
|
||||||
${cmd} mkdir -p /mnt/gentoo/swap
|
${cmd} mkdir -p /mnt/gentoo/swap
|
||||||
${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /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} mkdir -p /mnt/gentoo/swap
|
||||||
#${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /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
|
${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
|
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() {
|
function install_stage() {
|
||||||
show_options
|
show_options
|
||||||
|
|
||||||
|
@ -424,10 +438,14 @@ while [[ $# -gt 0 ]]; do
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-m|--mount)
|
--mount)
|
||||||
INSTALL_MODE=mount
|
INSTALL_MODE=mount
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--umount)
|
||||||
|
INSTALL_MODE=umount
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--stage)
|
--stage)
|
||||||
INSTALL_MODE=stage
|
INSTALL_MODE=stage
|
||||||
INSTALL_STAGE=$1
|
INSTALL_STAGE=$1
|
||||||
|
@ -477,6 +495,7 @@ else
|
||||||
case "$INSTALL_MODE" in
|
case "$INSTALL_MODE" in
|
||||||
normal) install_prep;;
|
normal) install_prep;;
|
||||||
mount) install_mount;;
|
mount) install_mount;;
|
||||||
|
umount) install_umount;;
|
||||||
stage) install_stage;;
|
stage) install_stage;;
|
||||||
clean) install_cleanup;;
|
clean) install_cleanup;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue