Added void unified script

This commit is contained in:
Suikan 2021-06-30 23:03:30 +09:00
parent a8dd34d222
commit 4d0f926ee4
10 changed files with 450 additions and 136 deletions

View file

@ -6,7 +6,7 @@ if [ $sourced -eq 0 ] ; then
cat <<HEREDOC 1>&2
***** ERROR : Must execute as source *****
Execute as following :
source 1-pre-install.sh
source ubuntu-kaiten-yaki.sh
Installation terminated.
HEREDOC
@ -28,7 +28,7 @@ if [ $? -eq 1 ] ; then # "Ubuntu" is not found in the OS name.
cat <<HEREDOC
*******************************************************************************
This system seems to be not Void Linux, while this script is dediated to the Void Linux.
Are you sure you want to run this script for installation? [Y/N]
Are you sure you want to run this script? [Y/N]
HEREDOC
read YESNO
if [ ${YESNO} != "Y" -a ${YESNO} != "y" ] ; then
@ -42,7 +42,11 @@ HEREDOC
fi # "Ubuntu" is not found in the OS name.
# For surre ask the config.sh is edited
echo "Are you ready to install? The destination logical volume label is \"${LVROOTNAME}\" [Y/N]"
cat <<HEREDOC
The destination logical volume label is \"${LVROOTNAME}\"
\"${LVROOTNAME}\" uses ${LVROOTSIZE} of the LVM volume group.
Are you ready to install? [Y/N]
HEREDOC
read YESNO
if [ ${YESNO} != "Y" -a ${YESNO} != "y" ] ; then
cat <<HEREDOC 1>&2
@ -194,7 +198,7 @@ Host Volume | Target Directory | Comment
/dev/mapper/vg1-ubuntu | / | Host volume name is up to your
| | configuration parameter.
/dev/mapper/swap | swap | Only the first distribution
| | installation requires this mapping.
| | requires this mapping.
************************ CAUTION! CAUTION! CAUTION! ****************************
@ -212,7 +216,7 @@ ubiquity &
ubiquity_pid=$!
# While the /etc/default/grub in the install target is NOT existing, keep sleeping.
# If ubiquity terminated without installation, this script also terminates.
# If ubiquity terminated without file copy, this script also terminates.
while [ ! -e /target/etc/default/grub ]
do
sleep 1 # 1sec.
@ -246,19 +250,6 @@ wait $ubiquity_pid
# Post-install stage
# *******************************************************************************
# Varidate whether script is executed as sourced or not
(return 0 2>/dev/null) && sourced=1 || sourced=0
if [ $sourced -eq 0 ] ; then
cat <<HEREDOC 1>&2
***** ERROR : Must execute as source *****
Execute as following :
source 3-post-install.sh
Installation terminated.
HEREDOC
exit # use "exit" instead of "return", if not "sourced" execusion
fi # "sourced" validation
## Mount the target file system
# /target is created by the Ubiquity installer
echo "...Mount /dev/mapper/${VGNAME}-${LVROOTNAME} on /target."