| 111 |
[ -f /etc/ssh/ssh_known_hosts ] && cp /etc/ssh/ssh_known_hosts $NFSROOT/root/.ssh/known_hosts |
[ -f /etc/ssh/ssh_known_hosts ] && cp /etc/ssh/ssh_known_hosts $NFSROOT/root/.ssh/known_hosts |
| 112 |
if [ -n "$LOGUSER" ] ; then |
if [ -n "$LOGUSER" ] ; then |
| 113 |
loguserhome=`eval "cd ~$LOGUSER 2>/dev/null && pwd;true"` |
loguserhome=`eval "cd ~$LOGUSER 2>/dev/null && pwd;true"` |
| 114 |
# is copying of *.pub important ? |
# is copying of *.pub important? |
| 115 |
[ -d $loguserhome/.ssh ] && { |
[ -d $loguserhome/.ssh ] && { |
| 116 |
[ -f $loguserhome/.ssh/identity ] && |
[ -f $loguserhome/.ssh/identity ] && |
| 117 |
cp -p $loguserhome/.ssh/identity* $NFSROOT/root/.ssh/ |
cp -p $loguserhome/.ssh/identity* $NFSROOT/root/.ssh/ |
| 163 |
call_verbose call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP |
call_verbose call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP |
| 164 |
$ROOTCMD apt-get clean |
$ROOTCMD apt-get clean |
| 165 |
echo "Creating base.tgz" |
echo "Creating base.tgz" |
| 166 |
tar -C $NFSROOT -cf - . | gzip > $NFSROOT/../base.tgz |
tar -l -C $NFSROOT -cf - . | gzip > $NFSROOT/../base.tgz |
| 167 |
mv $NFSROOT/../base.tgz $NFSROOT/var/tmp/base.tgz |
mv $NFSROOT/../base.tgz $NFSROOT/var/tmp/base.tgz |
| 168 |
else |
else |
| 169 |
die "\$FAI_DEBOOTSTRAP not defined" |
die "\$FAI_DEBOOTSTRAP not defined" |
| 181 |
|
|
| 182 |
if [ "$FAI_DEBMIRROR" ]; then |
if [ "$FAI_DEBMIRROR" ]; then |
| 183 |
mkdir -p $NFSROOT/$MNTPOINT |
mkdir -p $NFSROOT/$MNTPOINT |
| 184 |
mount -o ro,rsize=8192 $FAI_DEBMIRROR $NFSROOT/$MNTPOINT || \ |
mount -o ro,noatime,rsize=8192 $FAI_DEBMIRROR $NFSROOT/$MNTPOINT || \ |
| 185 |
die "Can't mount $FAI_DEBMIRROR" |
die "Can't mount $FAI_DEBMIRROR" |
| 186 |
fi |
fi |
| 187 |
|
|
| 302 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 303 |
setup_bootp(){ |
setup_bootp(){ |
| 304 |
|
|
| 305 |
mknbi-linux --verbose $NFSROOT/boot/vmlinuz-$KERNELVERSION /boot/fai/installimage |
if [ -x "`mknbi-linux`" ]; then |
| 306 |
# imggen is free software from 3com |
mknbi-linux --verbose -d /dev/nfs -i rom -a nfsroot=rom \ |
| 307 |
# it converts netboot image to images, that are bootable by 3com network cards |
$NFSROOT/boot/vmlinuz-$KERNELVERSION /boot/fai/installimage |
| 308 |
imggen=`which imggen || true` |
else |
| 309 |
if [ -x "$imggen" ]; then |
die "Command mknbi-linux not found. Please install the package netboot" |
| 310 |
imggen -a /boot/fai/installimage /boot/fai/installimage_3com |
fi |
| 311 |
|
|
| 312 |
|
# imggen is free software from 3com - use ver1.00: 1.01 produces "Image too Big" errors. |
| 313 |
|
# it converts netboot images to images which are bootable by 3com network cards |
| 314 |
|
if [ -x "`which imggen`" ]; then |
| 315 |
|
imggen -a /boot/fai/installimage /boot/fai/installimage_3com |
| 316 |
fi |
fi |
| 317 |
echo "BOOTP environment prepared." |
echo "BOOTP environment prepared." |
| 318 |
} |
} |