4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
6 if [[ $EUID != 0 ]]; then
7 echo "$0: error: expected to be root."
12 sed 's/^/root:/' $FAI/distro-install-common
/shadow
/community0p |
$ROOTCMD chpasswd
-e
14 # todo, need to set static ip here
15 if ifclass demohost
; then
16 cat > $target/etc
/network
/interfaces
<<EOF
19 iface lo inet loopback
23 source-directory /etc/network/interfaces.d
26 ip
=$
(getent ahosts
$HOSTNAME |
grep ^
209.
*RAW|
sed 's/ .*//')
27 ip6
=$
(getent ahosts
$HOSTNAME |
grep ^
2001.
*RAW|
sed 's/ .*//')
29 gateway6
=2001:470:142::1
30 cat > $target/etc
/network
/interfaces
<<EOF
31 # The loopback network interface
33 iface lo inet loopback
36 iface eth0 inet static
41 iface eth0 inet6 static
42 pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_dad
49 # previously had an else condition after
50 #elif ifclass VM || ifclass LINODE; then
51 # iface $NIC1 inet manual
56 # however, on t9, on startup, br0, became
57 # rename1 and didn't come up. i dunno why,
58 # but the bridge is for vms that I rarely use,
59 # so not bothering to figure it out.
62 ##### end network setup #####
64 # rm first to remove any symlink
65 rm -f $target/etc
/resolv.conf
67 if ifclass demohost
; then
68 cat >$target/etc
/resolv.conf
<<'EOF'
72 cat >$target/etc
/resolv.conf
<<'EOF'
75 nameserver 209.51.188.16
76 nameserver 209.51.188.27