[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#385226: initramfs-tools: no need to set SERVER_IP in scripts/nfs



Package: initramfs-tools
Version: 0.77
Severity: minor

i believe ipconfig defines ROOTSERVER when it is passed via the ip=
parameter, and thus it's not necessary to re-implement this code with
SERVER_IP in initramfs-tools/scripts/nfs

attached is a patch which removes this extra code.

also available from:

http://llama.freegeek.org/~vagrant/bzr-archives/initramfs-tools/vagrant-initramfs-tools

live well,
  vagrant
=== modified file 'scripts/nfs'
--- scripts/nfs	
+++ scripts/nfs	
@@ -26,9 +26,6 @@
 			if [ -n "${NEW_DEVICE}" ]; then
 				DEVICE="${NEW_DEVICE}"
 			fi
-			# grab server-ip
-			SERVER_IP=${IPOPTS#*:}
-			SERVER_IP=${SERVER_IP%:*:*:*:*:*:*}
 			;;
 	esac
 			
@@ -45,13 +42,10 @@
 			NFSOPTS="-o ${NFSROOT#*,}"
 		fi
 		NFSROOT=${NFSROOT%%,*}
-		# server-ip could be passed by ip
+		# rootserver could be passed by dhcp,
+		# with NFSROOT being only root-dir
 		if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then
-			if [ -n "${SERVER_IP}" ]; then
-				NFSROOT="${SERVER_IP}:${NFSROOT}"
-			else
-				NFSROOT=${ROOTSERVER}:${ROOTPATH}
-			fi
+			NFSROOT=${ROOTSERVER}:${NFSROOT}
 		fi
 	fi
 


Reply to: