summaryrefslogtreecommitdiff
path: root/packages/altboot/files/altboot-menu
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot/files/altboot-menu')
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/40-bootNFS13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
index baa426218b..e01af7faad 100644
--- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
+++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
@@ -20,11 +20,11 @@ run_module() {
init_rootfs
# Needed for NFS
- /etc/init.d/portmap start >/dev/tty1 2>&1 || die "/etc/init.d/portmap start failed!"
+ /etc/init.d/portmap start >/dev/null 2>&1 || die "/etc/init.d/portmap start failed!"
# For some reason NFS mounts hang if /e/i/networking is not run.
# For the time beeing I'm too lazy to investigate ;)
- /etc/init.d/networking start || die "/etc/init.d/networking start failed!"
+ /etc/init.d/networking start >/dev/null 2>&1 || die "/etc/init.d/networking start failed!"
sleep 2
@@ -126,6 +126,15 @@ run_module() {
mkdir -p /media/nfsroot || die "mkdir -p /media/nfsroot failed!"
echo -n "Mounting NFS root..."
+
+ if ( mount | grep -q "/media/nfsroot" )
+ then
+ echo "/media/nfsroot already used, tying to umount..."
+ umount /media/image
+ losetup -d /dev/loop0
+ umount /media/nfsroot || die "umount failed!"
+ fi
+
mount -t nfs "$selection" /media/nfsroot && echo ok || die "mount -t nfs "$selection" /media/nfsroot failed!"
# Use configured resolv.conf in the pivoted rootfs