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."
|
echo "...Unmounting all."
|
||||||
umount -R -l "${TARGETMOUNTPOINT}"
|
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}\"."
|
echo "...Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
||||||
vgchange -a n "${VGNAME}"
|
vgchange -a n "${VGNAME}"
|
||||||
echo "...Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
echo "...Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
||||||
cryptsetup close "${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
|
return 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,22 +66,6 @@ function main() {
|
||||||
# The script is parameterized by env-variable to fit to the distribution
|
# The script is parameterized by env-variable to fit to the distribution
|
||||||
post_install
|
post_install
|
||||||
|
|
||||||
# Free LUKS volume as swap volume.
|
|
||||||
echo "...Disabling swap to release the LUKS volume."
|
|
||||||
swapoff -a
|
|
||||||
|
|
||||||
# Deleting the passphrase information.
|
|
||||||
echo "...Deleting passphrase information."
|
|
||||||
PASSPHRASE=""
|
|
||||||
export PASSPHRASE
|
|
||||||
|
|
||||||
# Finishing message
|
|
||||||
cat <<- HEREDOC
|
|
||||||
****************** Install process finished ******************
|
|
||||||
|
|
||||||
...Ready to reboot.
|
|
||||||
HEREDOC
|
|
||||||
|
|
||||||
# Normal end
|
# Normal end
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,22 +81,6 @@ function main() {
|
||||||
# The script is parameterized by env-variable to fit to the distribution
|
# The script is parameterized by env-variable to fit to the distribution
|
||||||
post_install
|
post_install
|
||||||
|
|
||||||
# Free LUKS volume as swap volume.
|
|
||||||
echo "...Disabling swap to release the LUKS volume."
|
|
||||||
swapoff -a
|
|
||||||
|
|
||||||
# Deleting the passphrase information.
|
|
||||||
echo "...Deleting passphrase information."
|
|
||||||
PASSPHRASE=""
|
|
||||||
export PASSPHRASE
|
|
||||||
|
|
||||||
# Finishing message
|
|
||||||
cat <<- HEREDOC
|
|
||||||
****************** Install process finished ******************
|
|
||||||
|
|
||||||
...Ready to reboot.
|
|
||||||
HEREDOC
|
|
||||||
|
|
||||||
# Normal end
|
# Normal end
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue