Initial configuration for FAI (work in progress)
[grml-live.git] / etc / grml / fai / config / files / etc / rc2.d / S99fai-setup / FAISERVER
1 #! /bin/bash
2
3 # setup script that is only run once at boot time
4
5 echo "Creating the nfsroot for FAI."
6
7 . /etc/fai/fai.conf
8
9 if [ ! -d "$FAI_CONFIGDIR/class" ]; then
10     mkdir -p $FAI_CONFIGDIR
11     cp -a /usr/share/doc/fai-doc/examples/simple/* $FAI_CONFIGDIR
12 fi
13
14 # setup network
15 dhclient eth0  # connection to the outside world (hopefully)
16 ifconfig eth0:1 192.168.1.250 # (fixed address of faiserver)
17 /etc/init.d/nscd restart
18 /etc/init.d/apache2 restart
19 /etc/init.d/apt-proxy restart
20
21 fai-setup -v 2>&1 | tee /var/log/fai-setup.log
22
23 # create default pxelinux boot configuration (boot from local disk)
24 fai-chboot -o default
25
26 echo "Log files are saved to /var/log/fai-setup.log"
27
28 # remove me
29 rm $0