Fixes to the installer
This commit is contained in:
@@ -272,7 +272,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
|||||||
|
|
||||||
echo "echo \"\"" >> /mnt/setup-chroot.sh
|
echo "echo \"\"" >> /mnt/setup-chroot.sh
|
||||||
echo "echo \"Installing linux image, ifupdown dnsutils nfs-kernel-server apparmor-profiles vim, libvirt-bin, bridge-utils, net-tools, bash, screen, tmux, zfs-initramfs, dosfstools, mailutils, ssmtp, openssh-server, ufw, docker.io, sharutils...\"" >> /mnt/setup-chroot.sh
|
echo "echo \"Installing linux image, ifupdown dnsutils nfs-kernel-server apparmor-profiles vim, libvirt-bin, bridge-utils, net-tools, bash, screen, tmux, zfs-initramfs, dosfstools, mailutils, ssmtp, openssh-server, ufw, docker.io, sharutils...\"" >> /mnt/setup-chroot.sh
|
||||||
echo "errors=\$(DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt purge -y netplan 2>&1 1>/dev/null && apt autoremove -y 2>&1 1>/dev/null && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown dnsutils nfs-kernel-server apparmor-profiles vim libvirt-bin bridge-utils net-tools bash screen tmux zfs-initramfs dosfstools mailutils ssmtp openssh-server ufw docker.io sharutils 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
echo "errors=\$(DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt purge -y netplan 2>&1 1>/dev/null && apt autoremove -y 2>&1 1>/dev/null && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown smartmontools dnsutils nfs-kernel-server apparmor-profiles vim libvirt-bin bridge-utils net-tools bash screen tmux zfs-initramfs dosfstools mailutils ssmtp openssh-server ufw docker.io sharutils 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
||||||
|
|
||||||
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
|
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
|
||||||
echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh
|
echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh
|
||||||
@@ -439,7 +439,7 @@ echo 'echo "Done."'>> /mnt/setup-chroot.sh
|
|||||||
#sendemail -t to@example.com -m "Here is the file." -a attachmentFile
|
#sendemail -t to@example.com -m "Here is the file." -a attachmentFile
|
||||||
echo "mkdir \"/home/${admin}/.ssh\"" >> /mnt/setup-chroot.sh
|
echo "mkdir \"/home/${admin}/.ssh\"" >> /mnt/setup-chroot.sh
|
||||||
echo "ssh-keygen -b 4096 -t rsa -q -f \"/home/${admin}/.ssh/id_rsa\" -N '$rootpassword'" >> /mnt/setup-chroot.sh
|
echo "ssh-keygen -b 4096 -t rsa -q -f \"/home/${admin}/.ssh/id_rsa\" -N '$rootpassword'" >> /mnt/setup-chroot.sh
|
||||||
echo "cat /home/${admin}/.ssh/id_rsa.pub > /home/${admin}/.ssh/authorized_keys" >> /mnt/setup-chroot.sh
|
echo "cat /home/${admin}/.ssh/id_rsa.pub > \"/home/${admin}/.ssh/authorized_keys\"" >> /mnt/setup-chroot.sh
|
||||||
#echo "chmod 600 \"/home/${admin}/.ssh/id_rsa\"" >> /mnt/setup-chroot.sh
|
#echo "chmod 600 \"/home/${admin}/.ssh/id_rsa\"" >> /mnt/setup-chroot.sh
|
||||||
echo "chown -R ${admin}:${admin} \"/home/${admin}\"/.ssh" >> /mnt/setup-chroot.sh
|
echo "chown -R ${admin}:${admin} \"/home/${admin}\"/.ssh" >> /mnt/setup-chroot.sh
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ else
|
|||||||
connection="$address"
|
connection="$address"
|
||||||
fi
|
fi
|
||||||
# --content-filename=\"${hostname}.ssh.key\" --content-name=\"${hostname}.ssh.key\"
|
# --content-filename=\"${hostname}.ssh.key\" --content-name=\"${hostname}.ssh.key\"
|
||||||
echo "(echo \"Server available at $connection \\n`cat \"/home/${admin}/.ssh/id_rsa\"`\" | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" -r \"${email}\" \"${admins}\"" >> /mnt/setup-chroot.sh
|
echo "(echo \"Server available at $connection \\n\`cat \"/home/${admin}/.ssh/id_rsa\"\`\" | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" -r \"${email}\" \"${admins}\"" >> /mnt/setup-chroot.sh
|
||||||
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
||||||
|
|
||||||
echo "exit 0" >> /mnt/setup-chroot.sh
|
echo "exit 0" >> /mnt/setup-chroot.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user