#!/bin/bash -x set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR if [[ $EUID != 0 ]]; then echo "$0: error: expected to be root." exit 1 fi sed 's/^/root:/' $FAI/distro-install-common/shadow/community0p | $ROOTCMD chpasswd -e # todo, need to set static ip here if ifclass demohost; then cat > $target/etc/network/interfaces </dev/null; then cat >$target/etc/network/interfaces <>$target/etc/network/interfaces < /proc/sys/net/ipv6/conf/bond0/accept_dad address $ip6 netmask 48 gateway $gateway6 EOF fi else cat > $target/etc/network/interfaces <>$target/etc/network/interfaces < /proc/sys/net/ipv6/conf/eth0/accept_dad address $ip6 netmask 48 gateway $gateway6 EOF fi fi fi # previously had an else condition after #elif ifclass VM || ifclass LINODE; then # iface $NIC1 inet manual # iface br0 inet dhcp # bridge_ports $NIC1 # bridge_stp off # bridge_maxwait 0 # however, on t9, on startup, br0, became # rename1 and didn't come up. i dunno why, # but the bridge is for vms that I rarely use, # so not bothering to figure it out. ##### end network setup ##### # note: systemd-resolved + ifupdown causes networking.service to fail in t11, # https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1907878 systemctl disable systemd-resolved # rm first to remove any symlink rm -f $target/etc/resolv.conf if ifclass demohost || [[ $GATEWAYS != 209.51.188.* ]]; then cat >$target/etc/resolv.conf <<'EOF' nameserver 8.8.8.8 EOF else cat >$target/etc/resolv.conf <<'EOF' domain fsf.org search fsf.org nameserver 209.51.188.16 nameserver 209.51.188.27 EOF fi