X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=faiserver-setup;h=168dcda6d0518e09652ebfbb0c59fbbfcc4bd56d;hb=HEAD;hp=0501baca8c6da90d5f31e9c9be9ae14d970debe1;hpb=c59144a600fd661d9512d8a5005aa0f5bc29bf0d;p=automated-distro-installer diff --git a/faiserver-setup b/faiserver-setup index 0501bac..b2d8bc7 100755 --- a/faiserver-setup +++ b/faiserver-setup @@ -15,15 +15,14 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" +set -e; . /usr/local/lib/bash-bear; set +e [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -LC_USEBASHRC=t; . ~/.bashrc usage() { - cat < limittime )); then + if (( cachetime > limittime )); then update=true fi fi @@ -190,9 +194,14 @@ EOF # fi -$sed -f - /etc/fai/nfsroot.conf <>/srv/fai/nfsroot/root/.ssh/known_hosts done @@ -309,6 +317,7 @@ done # We could also just dump things in /srv/tftp, but fai # has some defaults, which I don't even use, which expect # the other directory, so it's kind of a tossup, whatever. +# This means fai's example isc-dhcp-server filename directory should remove the fai/ prefix. sed -ri 's,^ *(TFTP_DIRECTORY=).*,\1"/srv/tftp/fai",' /etc/default/tftpd-hpa systemctl restart tftpd-hpa @@ -353,6 +362,6 @@ echo "c0:2345:respawn:/sbin/agetty 115200 ttyS0 linux" >>/srv/fai/nfsroot/etc/in # the logsave prompted because the hostname faiserver was uknown. # Here it was faiserver.lan when running from a faiserver vm. # When running from a normal host with faiserver alias, it was the normal hosts name. -$sed 's/(^[^,]+,)\S+/\1faiserver/' /srv/fai/nfsroot/root/.ssh/known_hosts +$sed 's/(^[^,]+,)\S+/\1faiserver.b8.nz/' /srv/fai/nfsroot/root/.ssh/known_hosts # ditch the logo banner up top which screws with less. touch /srv/fai/nfsroot/.nocolorlogo