#! /bin/sh

fcopy /etc/hosts.equiv /etc/hosts.allow /etc/hosts.deny /root/.rhosts

cat > $target/etc/network/interfaces <<-EOF
# generated by FAI
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address $IPADDR
netmask $NETMASK
broadcast $BROADCAST
gateway $GATEWAYS
EOF
echo "localnet $NETWORK" > $target/etc/networks

[ -s /tmp/etc/resolv.conf ] && cp -p /tmp/etc/resolv.conf $target/etc
fcopy /etc/resolv.conf

ifclass NTP && {
cat > $target/etc/ntp.conf <<-EOF
	logfile /var/log/ntpd
	driftfile /var/lib/ntp/ntp.drift
	#broadcastclient yes
EOF
for s in $NTPSRVS; do
    echo "server $s" >> $target/etc/ntp.conf
done
}

fcopy /etc/printcap
for p in $printers; do
    mkdir -p $target/var/spool/lpd/$p
    chown lp:lp $target/var/spool/lpd/$p
    chmod 775 $target/var/spool/lpd/$p
done

fcopy /etc/ssh/ssh_known_hosts
