mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
Refactor the closing sequence.
All closing sequence is gathered to the post-install().
This commit is contained in:
parent
f725af8f44
commit
555bf5a38e
3 changed files with 18 additions and 33 deletions
|
|
@ -395,12 +395,29 @@ function post_install() {
|
|||
echo "...Unmounting all."
|
||||
umount -R -l "${TARGETMOUNTPOINT}"
|
||||
|
||||
echo "...Post install process finished."
|
||||
|
||||
# Free LUKS volume as swap volume.
|
||||
echo "...Disabling swap to release the LUKS volume."
|
||||
swapoff -a
|
||||
|
||||
# Close LUKS
|
||||
echo "...Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
||||
vgchange -a n "${VGNAME}"
|
||||
echo "...Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
||||
cryptsetup close "${CRYPTPARTNAME}"
|
||||
|
||||
echo "...Post install process finished."
|
||||
# Deleting the passphrase information.
|
||||
echo "...Deleting passphrase information."
|
||||
PASSPHRASE=""
|
||||
export PASSPHRASE
|
||||
|
||||
# Finishing message
|
||||
cat <<- HEREDOC
|
||||
****************** Install process finished ******************
|
||||
|
||||
...Ready to reboot.
|
||||
HEREDOC
|
||||
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue