4 fcopy
-Bv /etc
/fai
/apt
/sources.list
/etc
/dhcp
/dhcpd.conf
7 if [ $FAI_ACTION = "install" ]; then
9 # use the same sources.list for the server itself and the clients
10 cp -a $target/etc
/fai
/apt
$target/etc
/
12 if ifclass DHCPC
; then
13 rm -f $target/etc
/resolv.conf
15 echo 127.0.0.1 > $target/etc
/resolv.conf
18 # faiserver uses its own apt cache
19 ainsl
-av /etc
/apt
/apt.conf.d
/02proxy
'Acquire::http::Proxy "http://127.0.0.1:3142";'
21 # create some host entries
22 myip
=$
(ip addr show up|
grep -w inet | cut
-d t
-f 2 | cut
-d ' ' -f 2 | cut
-d / -f 1 |
grep -v 127.0.0.1)
23 ainsl
/etc
/hosts
"$myip faiserver" # that's me
24 ainsl
/etc
/hosts
"192.168.33.100 demohost"
25 ainsl
/etc
/hosts
"192.168.33.101 xfcehost"
26 # add entries for 10 hosts called client 01 .. 10
27 perl
-e 'for (1..10) {printf "192.168.33.%s client%02s\n",101+$_,$_;}' >> $target/etc
/hosts
29 sed -i -e '/# ReuseConnections: 1/d' $target/etc
/apt-cacher-ng
/acng.conf
30 ainsl
-v /etc
/apt-cacher-ng
/acng.conf
"ReuseConnections: 0"
32 # copy base file for faster building of nfsroot
33 cp -p /var
/tmp
/base.
tar.xz
$target/var
/tmp
35 if [ -d /media
/mirror
/pool
]; then
36 mkdir
$target/var
/cache
/apt-cacher-ng
/_import
37 cp -p /media
/mirror
/pool
/*/*/*/*.deb
$target/var
/cache
/apt-cacher-ng
/_import
38 $ROOTCMD chown
-R apt-cacher-ng.apt-cacher-ng
/var
/cache
/apt-cacher-ng
/_import
41 # copy basefiles from CD to config space
42 if [ -d $FAI/basefiles
]; then
43 mkdir
-p $target/srv
/fai
/config
/basefiles
44 cp -vp $FAI/basefiles
/*.
tar.
* $target/srv
/fai
/config
/basefiles
2>/dev
/null