From 53c4426a981b5b80e73e2ed5886c5459df123fa6 Mon Sep 17 00:00:00 2001 From: Suikan <26223147+suikan4github@users.noreply.github.com> Date: Thu, 1 Jul 2021 14:46:59 +0900 Subject: [PATCH] Refactored code again --- script/_parainstall.sh | 3 --- script/ubuntu-kaiten-yaki.sh | 17 ++++++++++------- script/void-kaiten-yaki.sh | 17 ++++++++++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/script/_parainstall.sh b/script/_parainstall.sh index d6969ac..c9ce0f2 100644 --- a/script/_parainstall.sh +++ b/script/_parainstall.sh @@ -2,9 +2,6 @@ # Common part of para-install # ******************************************************************************* -# Record the PID of the installer. -installer_pid=$! - # While the /etc/default/grub in the install target is NOT existing, keep sleeping. # If installer terminated without file copy, this script also terminates. while [ ! -e ${TARGETMOUNTPOINT}/etc/default/grub ] diff --git a/script/ubuntu-kaiten-yaki.sh b/script/ubuntu-kaiten-yaki.sh index 56ade88..aa56d4b 100644 --- a/script/ubuntu-kaiten-yaki.sh +++ b/script/ubuntu-kaiten-yaki.sh @@ -78,6 +78,9 @@ read dummy_var # Start Ubiquity installer ubiquity & +# Record the PID of the installer. +installer_pid=$! + # Common part of the para-install. # Record the install PID, modify the /etc/default/grub of the target, # and then, wait for the end of sintaller. @@ -88,17 +91,17 @@ source _parainstall.sh # ******************************************************************************* ## Mount the target file system -# /target is created by the Ubiquity installer -echo "...Mount /dev/mapper/${VGNAME}-${LVROOTNAME} on /target." -mount /dev/mapper/${VGNAME}-${LVROOTNAME} /target +# ${TARGETMOUNTPOINT} is created by the GUI/TUI installer +echo "...Mount /dev/mapper/${VGNAME}-${LVROOTNAME} on ${TARGETMOUNTPOINT}." +mount /dev/mapper/${VGNAME}-${LVROOTNAME} ${TARGETMOUNTPOINT} # And mount other directories echo "...Mount all other dirs." -for n in proc sys dev etc/resolv.conf; do mount --rbind "/$n" "/target/$n"; done +for n in proc sys dev etc/resolv.conf; do mount --rbind "/$n" "${TARGETMOUNTPOINT}/$n"; done # Change root and create the keyfile and ramfs image for Linux kernel. -echo "...Chroot to /target." -cat <