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

Bug#345654: marked as done (please add NFS support)



Your message dated Wed, 11 Jan 2006 00:47:22 +0000
with message-id <20060111004717.GA9222@deprecation.cyrius.com>
and subject line maybe not
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 2 Jan 2006 15:24:02 +0000
>From tbm@cyrius.com Mon Jan 02 07:24:02 2006
Return-path: <tbm@cyrius.com>
Received: from sorrow.cyrius.com ([65.19.161.204])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1EtRXW-0007AR-6m
	for submit@bugs.debian.org; Mon, 02 Jan 2006 07:24:02 -0800
Received: by sorrow.cyrius.com (Postfix, from userid 10)
	id BC9C064D54; Mon,  2 Jan 2006 15:24:01 +0000 (UTC)
Received: by deprecation.cyrius.com (Postfix, from userid 1000)
	id 5FE28844B; Mon,  2 Jan 2006 16:23:50 +0100 (CET)
Date: Mon, 2 Jan 2006 16:23:50 +0100
From: Martin Michlmayr <tbm@cyrius.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: please add NFS support
Message-ID: <[🔎] 20060102152350.GA26719@deprecation.cyrius.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.18
User-Agent: Mutt/1.5.11
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: preseed
Version: 1.11
Severity: wishlist
Tags: patch


The patch below adds NFS support to network-pressed.  You can pass a
NFS path in the form of nfs://$host/$path/$file and network-preseed
will mount the NFS share and copy the file to d-i.  Obviously, this
requires NFS support but this can be put on the initrd.  I intend to
do this for Cobalt to allow SSH installations on machines without
serial console.

(I've no idea whether d-i has a program to generate a safe /tmp
directory.)


Index: debian/network-preseed.postinst
===================================================================
--- debian/network-preseed.postinst	(revision 33661)
+++ debian/network-preseed.postinst	(working copy)
@@ -8,15 +8,33 @@
 preseed_fetch () {
 	local url="$1"
 	local file="$2"
-	iters=0
-	while [ $iters -lt 3 ]; do
-		# TODO proxy support? Would it be useful?
-		# TODO add progress bar
-		if wget -q "$url" -O "$file"; then
+	case "$url" in
+		nfs://*)
+			url=${url#nfs://}
+			host=$(echo "$url" | cut -d / -f 1)
+			url=${url#$host}
+			path=`dirname $url`
+			file=`basename $url`
+			mnt=/tmp/nfs
+			mkdir $mnt
+			mount -t nfs $host:$path $mnt
+			cp $mnt/$file $file
+			umount $mnt
+			rmdir $mnt
 			return 0
-		fi
-        	iters=$(($iters + 1))
-	done
+			;;
+		*)
+			iters=0
+			while [ $iters -lt 3 ]; do
+				# TODO proxy support? Would it be useful?
+				# TODO add progress bar
+				if wget -q "$url" -O "$file"; then
+					return 0
+				fi
+				iters=$(($iters + 1))
+			done
+			;;
+	esac
 	return 1
 }
 preseed_relative () {



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

-- 
Martin Michlmayr
http://www.cyrius.com/

---------------------------------------
Received: (at 345654-done) by bugs.debian.org; 11 Jan 2006 00:47:41 +0000
>From tbm@cyrius.com Tue Jan 10 16:47:41 2006
Return-path: <tbm@cyrius.com>
Received: from sorrow.cyrius.com ([65.19.161.204])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1EwU9M-0006Lv-Rr
	for 345654-done@bugs.debian.org; Tue, 10 Jan 2006 16:47:41 -0800
Received: by sorrow.cyrius.com (Postfix, from userid 10)
	id 1653264D55; Wed, 11 Jan 2006 00:47:39 +0000 (UTC)
Received: by deprecation.cyrius.com (Postfix, from userid 1000)
	id 8709B844F; Wed, 11 Jan 2006 00:47:22 +0000 (GMT)
Date: Wed, 11 Jan 2006 00:47:22 +0000
From: Martin Michlmayr <tbm@cyrius.com>
To: 345654-done@bugs.debian.org
Subject: maybe not
Message-ID: <20060111004717.GA9222@deprecation.cyrius.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.11
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02

Actually, NFS support doesn't help me.  Closing this bug, and reverted
the change in SVN.
-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: