Refactored

The para-install part is now local function
This commit is contained in:
Suikan 2021-07-03 10:02:38 +09:00
parent 2d2d200fef
commit de0e689e27
2 changed files with 45 additions and 23 deletions

View file

@ -45,6 +45,27 @@ function main() {
# Para-install stage # Para-install stage
# ******************************************************************************* # *******************************************************************************
# Start the GUI installer and modify the target /etc/default/grub in parallel
if ! para_install_local ; then
return 1 # with error status
fi
# *******************************************************************************
# Post-install stage
# *******************************************************************************
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
post_install_local
# Normal end
return 0
} # End of main()
# *******************************************************************************
# Ubuntu dependent para-installation process
function para_install_local() {
# Show common message to let the operator focus on the critical part # Show common message to let the operator focus on the critical part
para_install_msg para_install_msg
@ -76,18 +97,8 @@ function main() {
return 1 # with error status return 1 # with error status
fi fi
# *******************************************************************************
# Post-install stage
# *******************************************************************************
# Finalizing. Embedd encryption key into the ramfs image.
post_install_local
# Normal end
return 0 return 0
}
} # End of main()
# ******************************************************************************* # *******************************************************************************
# Ubuntu dependent post-installation process # Ubuntu dependent post-installation process

View file

@ -11,7 +11,7 @@ function main() {
# This is the mount point of the install target. # This is the mount point of the install target.
export TARGETMOUNTPOINT="/mnt/target" export TARGETMOUNTPOINT="/mnt/target"
# ******************************************************************************* # *******************************************************************************
# Confirmation before installation # Confirmation before installation
@ -63,6 +63,27 @@ function main() {
# Para-install stage # Para-install stage
# ******************************************************************************* # *******************************************************************************
# Start the TUI installer and modify the target /etc/default/grub in background
if ! para_install_local ; then
return 1 # with error status
fi
# *******************************************************************************
# Post-install stage
# *******************************************************************************
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
post_install_local
# Normal end
return 0
} # End of main()
# *******************************************************************************
# Void Linux dependent post-installation process
function para_install_local() {
# Show common message to let the operator focus on the critical part # Show common message to let the operator focus on the critical part
para_install_msg para_install_msg
@ -99,18 +120,8 @@ function main() {
return 1 # with error status return 1 # with error status
fi fi
# *******************************************************************************
# Post-install stage
# *******************************************************************************
# Finalizing. Embedd encryption key into the ramfs image.
post_install_local
# Normal end
return 0 return 0
}
} # End of main()
# ******************************************************************************* # *******************************************************************************
# Void Linux dependent post-installation process # Void Linux dependent post-installation process