From 341ff01a468960feb32b7c24ee0874fc4e719d47 Mon Sep 17 00:00:00 2001 From: sean Date: Thu, 18 Jul 2019 13:34:43 -0700 Subject: [PATCH] tweaks --- setup.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 98f640c..cefa9c3 100644 --- a/setup.sh +++ b/setup.sh @@ -287,7 +287,15 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh # network configuration should have optional static configuration - not just DHCP, it's very important -echo "systemctl unmask networking 2>&1 1>/dev/null && systemctl enable networking 2>&1 1>/dev/null" >> /mnt/setup-chroot.sh +echo "echo \"\"" >> /mnt/setup-chroot.sh +echo "echo \"Enabling networking service...\"" >> /mnt/setup-chroot.sh +echo "error=\$(systemctl unmask networking 2>&1 1>/dev/null && systemctl enable networking 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh +echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh +echo ' echo "Failed to enable networking service - $errors"' >> /mnt/setup-chroot.sh +echo " exit 118">> /mnt/setup-chroot.sh +echo "fi">> /mnt/setup-chroot.sh +echo "echo \"Done.\"" >> /mnt/setup-chroot.sh + # configure docker storage to use zfs mkdir -p /mnt/etc/docker @@ -439,7 +447,7 @@ echo "chown -R ${admin}:${admin} \"/home/${admin}\"/.ssh" >> /mnt/setup-chroot.s #echo "chown smmsp:smmsp /var/spool/mqueue" >> /mnt/setup-chroot.sh #echo "chmod g+w /var/spool/mqueue" >> /mnt/setup-chroot.sh #echo "chown smmsp:smmsp /var/spool/mqueue-client" >> /mnt/setup-chroot.sh -echo "chmod g+w /var/spool/mqueue-client" >> /mnt/setup-chroot.sh +#echo "chmod g+w /var/spool/mqueue-client" >> /mnt/setup-chroot.sh echo "HOME=\"/root\"" >> /mnt/setup-chroot.sh echo "HOSTNAME=\"$hostname\"" >> /mnt/setup-chroot.sh @@ -461,7 +469,8 @@ echo "newaliases" >> /mnt/setup-chroot.sh echo "systemctl unmask postfix 2>&1 1>/dev/null && service postfix start 2>&1 1>/dev/null" >> /mnt/setup-chroot.sh echo "cat \"/home/${admin}/.ssh/id_rsa.pub\" | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa.pub\" admin" >> /mnt/setup-chroot.sh echo "cat /home/parker/.ssh/id_rsa.pub | mail -s \"${fqdn} SSH key\" -A /home/parker/.ssh/id_rsa.pub -r \"${email}\" admin" >> /mnt/setup-chroot.sh -echo "while ! [ \"\$(/usr/bin/mailq)\" = \"mailq: Mail queue is empty\" ]; do echo \"waiting for e-mail to send...\"; sleep 5; done" >> /mnt/setup-chroot.sh +echo "postfix -f" >> /mnt/setup-chroot.sh +#echo "while ! [ \"\$(/usr/bin/mailq)\" = \"mailq: Mail queue is empty\" ]; do echo \"waiting for e-mail to send...\"; sleep 5; done" >> /mnt/setup-chroot.sh echo "service postfix stop 2>&1 1>/dev/null" >> /mnt/setup-chroot.sh echo "echo \"Done.\"" >> /mnt/setup-chroot.sh