mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
Add double quote the name in message
This commit is contained in:
parent
e6bee52a06
commit
d4b92dea47
1 changed files with 12 additions and 12 deletions
|
|
@ -35,7 +35,7 @@ if [ ${ERASEALL} -eq 1 ] ; then
|
||||||
read YESNO
|
read YESNO
|
||||||
if [ ${YESNO} != "Y" -a ${YESNO} != "y" ] ; then
|
if [ ${YESNO} != "Y" -a ${YESNO} != "y" ] ; then
|
||||||
cat <<HEREDOC 1>&2
|
cat <<HEREDOC 1>&2
|
||||||
Check config.sh. The ERASEALL is ${ERASEALL}.
|
Check config.sh. The variable ERASEALL is ${ERASEALL}.
|
||||||
|
|
||||||
Installation terminated.
|
Installation terminated.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
@ -67,7 +67,7 @@ if [ ${ERASEALL} -eq 1 ] ; then
|
||||||
# Assign specified space and rest of disk to the EFI and LUKS partition, respectively.
|
# Assign specified space and rest of disk to the EFI and LUKS partition, respectively.
|
||||||
if [ ${ISEFI} -eq 1 ] ; then
|
if [ ${ISEFI} -eq 1 ] ; then
|
||||||
# Zap existing partition table and create new GPT
|
# Zap existing partition table and create new GPT
|
||||||
echo "...Initialize ${DEV} with GPT."
|
echo "...Initialize \"${DEV}\" with GPT."
|
||||||
sgdisk --zap-all "${DEV}"
|
sgdisk --zap-all "${DEV}"
|
||||||
# Create EFI partition and format it
|
# Create EFI partition and format it
|
||||||
echo "...Create an EFI partition on ${DEV}."
|
echo "...Create an EFI partition on ${DEV}."
|
||||||
|
|
@ -75,16 +75,16 @@ if [ ${ERASEALL} -eq 1 ] ; then
|
||||||
echo "...Format the EFI parttion."
|
echo "...Format the EFI parttion."
|
||||||
mkfs.vfat -F 32 -n EFI-SP "${DEV}${EFIPARTITION}"
|
mkfs.vfat -F 32 -n EFI-SP "${DEV}${EFIPARTITION}"
|
||||||
# Create Linux partition
|
# Create Linux partition
|
||||||
echo "...Create a Linux partition on ${DEV}."
|
echo "...Create a Linux partition on \"${DEV}\"."
|
||||||
sgdisk --new=${CRYPTPARTITION}:0:0 --change-name=${CRYPTPARTITION}:"Linux LUKS" --typecode=${CRYPTPARTITION}:8309 "${DEV}"
|
sgdisk --new=${CRYPTPARTITION}:0:0 --change-name=${CRYPTPARTITION}:"Linux LUKS" --typecode=${CRYPTPARTITION}:8309 "${DEV}"
|
||||||
# Then print them
|
# Then print them
|
||||||
sgdisk --print "${DEV}"
|
sgdisk --print "${DEV}"
|
||||||
else
|
else
|
||||||
# Zap existing partition table
|
# Zap existing partition table
|
||||||
echo "...Erase partition table of ${DEV}."
|
echo "...Erase partition table of \"${DEV}\"."
|
||||||
dd if=/dev/zero of=${DEV} bs=512 count=1
|
dd if=/dev/zero of=${DEV} bs=512 count=1
|
||||||
# Create MBR and allocate max storage for Linux partition
|
# Create MBR and allocate max storage for Linux partition
|
||||||
echo "...Create a Linux partition on ${DEV} with MBR."
|
echo "...Create a Linux partition on \"${DEV}\" with MBR."
|
||||||
sfdisk ${DEV} <<HEREDOC
|
sfdisk ${DEV} <<HEREDOC
|
||||||
2M,,L
|
2M,,L
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
@ -98,13 +98,13 @@ fi # if erase all
|
||||||
|
|
||||||
# ----- Open the LUKS partition -----
|
# ----- Open the LUKS partition -----
|
||||||
# Open the crypt partition.
|
# Open the crypt partition.
|
||||||
echo "...Open a crypt partition ${DEV}${CRYPTPARTITION} as ${CRYPTPARTNAME}"
|
echo "...Open a crypt partition ${DEV}${CRYPTPARTITION} as \"${CRYPTPARTNAME}\""
|
||||||
printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME}
|
printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME}
|
||||||
|
|
||||||
# Check whether successful open. If mapped, it is successful.
|
# Check whether successful open. If mapped, it is successful.
|
||||||
if [ ! -e /dev/mapper/${CRYPTPARTNAME} ] ; then
|
if [ ! -e /dev/mapper/${CRYPTPARTNAME} ] ; then
|
||||||
cat <<HEREDOC 1>&2
|
cat <<HEREDOC 1>&2
|
||||||
***** ERROR : Cannot open LUKS volume ${CRYPTPARTNAME} on ${DEV}${CRYPTPARTITION}. *****
|
***** ERROR : Cannot open LUKS volume "${CRYPTPARTNAME}" on ${DEV}${CRYPTPARTITION}. *****
|
||||||
Check passphrase and config.txt
|
Check passphrase and config.txt
|
||||||
|
|
||||||
Installation terminated.
|
Installation terminated.
|
||||||
|
|
@ -118,9 +118,9 @@ vgdisplay -s ${VGNAME} &> /dev/null
|
||||||
if [ $? -eq 0 ] ; then # is return value 0? ( exist ?)
|
if [ $? -eq 0 ] ; then # is return value 0? ( exist ?)
|
||||||
echo "...Volume group ${VGNAME} already exist. Skipped to create"
|
echo "...Volume group ${VGNAME} already exist. Skipped to create"
|
||||||
else
|
else
|
||||||
echo "...Initialize a physical volume on ${CRYPTPARTNAME}"
|
echo "...Initialize a physical volume on \"${CRYPTPARTNAME}\""
|
||||||
pvcreate /dev/mapper/${CRYPTPARTNAME}
|
pvcreate /dev/mapper/${CRYPTPARTNAME}
|
||||||
echo "...And then create Volume group ${VGNAME}."
|
echo "...And then create Volume group \"${VGNAME}\"."
|
||||||
vgcreate ${VGNAME} /dev/mapper/${CRYPTPARTNAME}
|
vgcreate ${VGNAME} /dev/mapper/${CRYPTPARTNAME}
|
||||||
fi # if /dev/volume-groupt not exist
|
fi # if /dev/volume-groupt not exist
|
||||||
|
|
||||||
|
|
@ -128,21 +128,21 @@ fi # if /dev/volume-groupt not exist
|
||||||
if [ -e /dev/mapper/${VGNAME}-${LVSWAPNAME} ] ; then
|
if [ -e /dev/mapper/${VGNAME}-${LVSWAPNAME} ] ; then
|
||||||
echo "...Swap volume already exist. Skipped to create"
|
echo "...Swap volume already exist. Skipped to create"
|
||||||
else
|
else
|
||||||
echo "...Create logical volume ${LVSWAPNAME} on ${VGNAME}."
|
echo "...Create logical volume \"${LVSWAPNAME}\" on \"${VGNAME}\"."
|
||||||
lvcreate -L ${LVSWAPSIZE} -n ${LVSWAPNAME} ${VGNAME}
|
lvcreate -L ${LVSWAPSIZE} -n ${LVSWAPNAME} ${VGNAME}
|
||||||
fi # if /dev/mapper/swap volume already exit.
|
fi # if /dev/mapper/swap volume already exit.
|
||||||
|
|
||||||
# Create a ROOT Logical Volume on VG.
|
# Create a ROOT Logical Volume on VG.
|
||||||
if [ -e /dev/mapper/${VGNAME}-${LVROOTNAME} ] ; then
|
if [ -e /dev/mapper/${VGNAME}-${LVROOTNAME} ] ; then
|
||||||
cat <<HEREDOC 1>&2
|
cat <<HEREDOC 1>&2
|
||||||
***** ERROR : Logical volume ${VGNAME}-${LVROOTNAME} already exists. *****
|
***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. *****
|
||||||
Check LVROOTNAME environment variable in config.txt.
|
Check LVROOTNAME environment variable in config.txt.
|
||||||
|
|
||||||
Installation terminated.
|
Installation terminated.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
echo "...Create logical volume ${LVROOTNAME} on ${VGNAME}."
|
echo "...Create logical volume \"${LVROOTNAME}\" on \"${VGNAME}\"."
|
||||||
lvcreate -l ${LVROOTSIZE} -n ${LVROOTNAME} ${VGNAME}
|
lvcreate -l ${LVROOTSIZE} -n ${LVROOTNAME} ${VGNAME}
|
||||||
fi # if the root volun already exist
|
fi # if the root volun already exist
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue