removoed extra server from config
[fai-configs.git] / hooks / partition.DISKLESS
CommitLineData
3dfaa361 1#! /bin/sh
2
3# install a diskless workstation
4# this is just an example, but not perfect code
5#
6# (c) Thomas Lange, 2001, lange at debian.org
7
8# server and all filesystems for diskless client
9server=...... # Fill in your server's name
10root=/export/$HOSTNAME # Change according to your situation
11var=
12swap=
13
14# Under lenny, the mount point does not exist at this stage yet.
15[ ! -d $target ] && mkdir $target
16
17# dpkg wants a lock but linux NFS can't do it yet
18mountopt="-o nolock,async"
19# Add the options which helped to speed up diskless machines under etch.
20mountopt=${mountopt},tcp,intr,rsize=8192,wsize=8192,retrans=10
21
22# mount2dir can't mount nfs directories yet, so do it now
23# and skip the default task later
24# also clean up the directories (preserve is not yet possible)
25mount $mountopt $server:$root $target
26echo 'Deleting target files from previous OS may take some time...'
27echo 'You may help a little by deleting files yourself on the server.'
28#rm -rf $target/.[0-z]* $target/*
29(cd $target; mklost+found)
30
31# create fstab
32cat > /tmp/fai/fstab <<EOF
33$server:$root / nfs rw,errors=remount-ro 0 0
34EOF
35# $server:$usr /usr nfs rw 0 0
36
37echo "#!" > $LOGDIR/disk_var.sh
38
39# now skip some default tasks
40skiptask partition mountdisks