From d4b92dea4748a88b7bc7d7a020bbdf909462eb93 Mon Sep 17 00:00:00 2001 From: Suikan <26223147+suikan4github@users.noreply.github.com> Date: Tue, 29 Jun 2021 09:58:03 +0900 Subject: [PATCH] Add double quote the name in message --- ubuntu/1-pre-install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ubuntu/1-pre-install.sh b/ubuntu/1-pre-install.sh index 36d12af..bb67d91 100644 --- a/ubuntu/1-pre-install.sh +++ b/ubuntu/1-pre-install.sh @@ -35,7 +35,7 @@ if [ ${ERASEALL} -eq 1 ] ; then read YESNO if [ ${YESNO} != "Y" -a ${YESNO} != "y" ] ; then cat <&2 -Check config.sh. The ERASEALL is ${ERASEALL}. +Check config.sh. The variable ERASEALL is ${ERASEALL}. Installation terminated. HEREDOC @@ -67,7 +67,7 @@ if [ ${ERASEALL} -eq 1 ] ; then # Assign specified space and rest of disk to the EFI and LUKS partition, respectively. if [ ${ISEFI} -eq 1 ] ; then # Zap existing partition table and create new GPT - echo "...Initialize ${DEV} with GPT." + echo "...Initialize \"${DEV}\" with GPT." sgdisk --zap-all "${DEV}" # Create EFI partition and format it echo "...Create an EFI partition on ${DEV}." @@ -75,16 +75,16 @@ if [ ${ERASEALL} -eq 1 ] ; then echo "...Format the EFI parttion." mkfs.vfat -F 32 -n EFI-SP "${DEV}${EFIPARTITION}" # 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}" # Then print them sgdisk --print "${DEV}" else # 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 # 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} <&2 -***** ERROR : Cannot open LUKS volume ${CRYPTPARTNAME} on ${DEV}${CRYPTPARTITION}. ***** +***** ERROR : Cannot open LUKS volume "${CRYPTPARTNAME}" on ${DEV}${CRYPTPARTITION}. ***** Check passphrase and config.txt Installation terminated. @@ -118,9 +118,9 @@ vgdisplay -s ${VGNAME} &> /dev/null if [ $? -eq 0 ] ; then # is return value 0? ( exist ?) echo "...Volume group ${VGNAME} already exist. Skipped to create" else - echo "...Initialize a physical volume on ${CRYPTPARTNAME}" + echo "...Initialize a physical volume on \"${CRYPTPARTNAME}\"" pvcreate /dev/mapper/${CRYPTPARTNAME} - echo "...And then create Volume group ${VGNAME}." + echo "...And then create Volume group \"${VGNAME}\"." vgcreate ${VGNAME} /dev/mapper/${CRYPTPARTNAME} 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 echo "...Swap volume already exist. Skipped to create" else - echo "...Create logical volume ${LVSWAPNAME} on ${VGNAME}." + echo "...Create logical volume \"${LVSWAPNAME}\" on \"${VGNAME}\"." lvcreate -L ${LVSWAPSIZE} -n ${LVSWAPNAME} ${VGNAME} fi # if /dev/mapper/swap volume already exit. # Create a ROOT Logical Volume on VG. if [ -e /dev/mapper/${VGNAME}-${LVROOTNAME} ] ; then cat <&2 -***** ERROR : Logical volume ${VGNAME}-${LVROOTNAME} already exists. ***** +***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. ***** Check LVROOTNAME environment variable in config.txt. Installation terminated. HEREDOC return else - echo "...Create logical volume ${LVROOTNAME} on ${VGNAME}." + echo "...Create logical volume \"${LVROOTNAME}\" on \"${VGNAME}\"." lvcreate -l ${LVROOTSIZE} -n ${LVROOTNAME} ${VGNAME} fi # if the root volun already exist