QOL improvements to scripts and script
This commit is contained in:
parent
a2cb5a6fec
commit
4cf98e06a7
|
@ -130,6 +130,7 @@ prepare_rootfs() {
|
||||||
sudo tee -a ${tempdir}/rootfs/root/.bashrc <<<"/install.sh" &>/dev/null || fail "Error setting bashrc."
|
sudo tee -a ${tempdir}/rootfs/root/.bashrc <<<"/install.sh" &>/dev/null || fail "Error setting bashrc."
|
||||||
sudo chroot ${tempdir}/rootfs/ /usr/bin/passwd -d root &>/dev/null || fail "Error disabling root password."
|
sudo chroot ${tempdir}/rootfs/ /usr/bin/passwd -d root &>/dev/null || fail "Error disabling root password."
|
||||||
sudo cp install.sh ${tempdir}/rootfs/ &>/dev/null || fail "Error copying install.sh to tempdir."
|
sudo cp install.sh ${tempdir}/rootfs/ &>/dev/null || fail "Error copying install.sh to tempdir."
|
||||||
|
sudo sed -i "s/XXISOXX/${isofilename}/g" ${tempdir}/rootfs/install.sh &>/dev/null || fail "Error editing install.sh script."
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Generating squashfs image of live installation... "
|
echo -n "Generating squashfs image of live installation... "
|
||||||
|
|
18
install.sh
18
install.sh
|
@ -12,16 +12,19 @@ debpkglist="lvm2,parted,gdisk,grub-pc,grub-efi-amd64,linux-image-amd64,sudo,vim,
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
echo "------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
echo "| Preparing to install a PVC node base system. |"
|
echo "| PVC Node installer (XXISOXX) |"
|
||||||
echo "------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
|
echo
|
||||||
|
echo "This LiveCD will install a PVC node base system ready for bootstrapping with 'pvc-ansible'."
|
||||||
echo
|
echo
|
||||||
echo "NOTE: If you make a mistake and need to restart the installer while answering"
|
echo "NOTE: If you make a mistake and need to restart the installer while answering"
|
||||||
echo " the questions below, you may do so by typing ^C to cancel the script,"
|
echo " the questions below, you may do so by typing ^C to cancel the script,"
|
||||||
echo " then re-running it by calling /install.sh in the resulting shell."
|
echo " then re-running it by calling /install.sh in the resulting shell."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "1) Please enter a fully-qualified hostname for the system."
|
echo "1) Please enter a fully-qualified hostname for the system. This should match the hostname"
|
||||||
|
echo "in the 'pvc-ansible' inventory."
|
||||||
while [[ -z ${target_hostname} ]]; do
|
while [[ -z ${target_hostname} ]]; do
|
||||||
echo
|
echo
|
||||||
echo -n "> "
|
echo -n "> "
|
||||||
|
@ -46,7 +49,8 @@ disks="$(
|
||||||
|
|
||||||
echo "2) Please enter the disk to install the PVC base system to. This disk will be"
|
echo "2) Please enter the disk to install the PVC base system to. This disk will be"
|
||||||
echo "wiped, an LVM PV created on it, and the system installed to this LVM."
|
echo "wiped, an LVM PV created on it, and the system installed to this LVM."
|
||||||
echo "NOTE: PVC requires a disk of >16GB to be installed to. 32GB is the recommended minimum."
|
echo "NOTE: PVC requires a disk of >16GB to be installed to. 32GB is the recommended"
|
||||||
|
echo "minimum size, and disks larger than 64GB are not particularly useful."
|
||||||
echo
|
echo
|
||||||
echo "Available disks:"
|
echo "Available disks:"
|
||||||
echo
|
echo
|
||||||
|
@ -71,8 +75,8 @@ interfaces="$(
|
||||||
ip address | grep '^[0-9]' | grep 'eno\|enp\|ens\|wlp' | awk '{ print $2"\t"$3 }' | tr -d ':'
|
ip address | grep '^[0-9]' | grep 'eno\|enp\|ens\|wlp' | awk '{ print $2"\t"$3 }' | tr -d ':'
|
||||||
)"
|
)"
|
||||||
echo "3a) Please enter the primary network interface for external connectivity. If"
|
echo "3a) Please enter the primary network interface for external connectivity. If"
|
||||||
echo " no entries are shown here, ensure a cable is connected, then restart the"
|
echo "no entries are shown here, ensure a cable is connected, then restart the"
|
||||||
echo " installer."
|
echo "installer."
|
||||||
echo
|
echo
|
||||||
echo "Available interfaces:"
|
echo "Available interfaces:"
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue