summaryrefslogtreecommitdiff
path: root/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot/files/altboot-menu/Advanced/40-bootNFS')
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/40-bootNFS20
1 files changed, 17 insertions, 3 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
index 3a41fccf79..baa426218b 100644
--- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
+++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
@@ -91,7 +91,20 @@ run_module() {
do
stty echo
echo -n "Boot NFS root: "
- read junk < /dev/tty1
+
+ if test "$AUTOBOOT" != "yes"
+ then
+ read junk < /dev/tty1
+ else
+ if test -e /etc/.altboot-bootNFS-source.last
+ then
+ junk="`cat /etc/.altboot-bootNFS-source.last`"
+ test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)"
+ else
+ read junk < /dev/tty1
+ fi
+ fi
+
cnt=1
for nfs_mount in $nfs_mounts
@@ -99,6 +112,7 @@ run_module() {
if test "$junk" = "$cnt"
then
selection="$nfs_mount"
+ echo "$junk" > /etc/.altboot-bootNFS-source.last
fi
let cnt=$cnt+1
done
@@ -115,10 +129,10 @@ run_module() {
mount -t nfs "$selection" /media/nfsroot && echo ok || die "mount -t nfs "$selection" /media/nfsroot failed!"
# Use configured resolv.conf in the pivoted rootfs
- echo -n "Copying resolv.conf..."
+ #echo -n "Copying resolv.conf..."
#cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED"
- check_target "/media/nfsroot"
+ check_target "/media/nfsroot" bootNFS
}