[Fai-commit] r6695 - trunk/bin
Thomas Lange
lange at alioth.debian.org
Thu Oct 20 15:21:19 UTC 2011
Author: lange
Date: 2011-10-20 15:21:19 +0000 (Thu, 20 Oct 2011)
New Revision: 6695
Modified:
trunk/bin/make-fai-nfsroot
Log:
code restructuring for getting generic nfsroot easier
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2011-10-19 09:09:45 UTC (rev 6694)
+++ trunk/bin/make-fai-nfsroot 2011-10-20 15:21:19 UTC (rev 6695)
@@ -256,6 +256,11 @@
for eth in $ips; do
getent hosts $eth >> etc/hosts || true
done
+
+ if [ -f /etc/resolv.conf ]; then
+ cp -Lp $v /etc/resolv.conf $NFSROOT/etc/resolv.conf-installserver
+ cp -Lp $v /etc/resolv.conf $NFSROOT/etc/resolv.conf # this is needed during make-fai-nfsroot
+ fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
create_base() {
@@ -326,17 +331,18 @@
# liloconfig, dump needs these files
echo "# UNCONFIGURED FSTAB FOR BASE SYSTEM" > etc/fstab
- # this copies sources.list into the nfsroot
- cp -La $cfdir/apt $NFSROOT/etc
-
- add_etc_hosts_entries
-
# we need these option before installing the first package. So we
# can't put this into fai-nfsroot /etc/apt/apt.conf.d/90fai
cat <<EOF >$NFSROOT/etc/apt/apt.conf.d/10fai
APT::Get::AllowUnauthenticated "true";
Aptitude::CmdLine::Ignore-Trust-Violations yes;
EOF
+
+ # this copies sources.list into the nfsroot
+ cp -La $cfdir/apt $NFSROOT/etc
+
+ add_etc_hosts_entries
+
echo "Upgrading $NFSROOT"
LC_ALL=C call_verbose upgrade_nfsroot
@@ -379,10 +385,6 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
upgrade_nfsroot() {
- if [ -f /etc/resolv.conf ]; then
- cp -Lp $v /etc/resolv.conf $NFSROOT/etc/resolv.conf-installserver
- cp -Lp $v /etc/resolv.conf $NFSROOT/etc/resolv.conf # this is needed during make-fai-nfsroot
- fi
mount -t proc /proc $NFSROOT/proc
mount -t sysfs /sys $NFSROOT/sys
mount -t devpts devpts $NFSROOT/dev/pts
More information about the Fai-commit
mailing list