2d1f8014 |
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 | . /etc/fai/make-fai-nfsroot.conf |
9 | |
10 | if [ ! -d "$FAI_CONFIGDIR/class" ]; then |
11 | mkdir -p $FAI_CONFIGDIR |
12 | cp -a /usr/share/doc/fai-doc/examples/simple/* $FAI_CONFIGDIR |
13 | fi |
14 | |
15 | # setup network |
16 | dhclient eth0 # connection to the outside world (hopefully) |
17 | ip addr add 192.168.1.250 dev eth0 # (fixed address of faiserver) |
18 | /etc/init.d/nscd restart |
19 | /etc/init.d/apache2 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 |