Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Sep 2006 10:50:22 GMT
From:      "[LoN]Kamikaze" <LoN_Kamikaze@gmx.de>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/103089: [sbin/mount_nfs] introduce new option
Message-ID:  <200609101050.k8AAoM6S025407@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/103089; it has been noted by GNATS.

From: "[LoN]Kamikaze" <LoN_Kamikaze@gmx.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/103089: [sbin/mount_nfs] introduce new option
Date: Sun, 10 Sep 2006 12:47:20 +0200

 In my foolish haste I submitted the wrong patch. This one actually works.
 
 
 
 diff -Pur sbin/mount_nfs.orig/mount_nfs.8 sbin/mount_nfs/mount_nfs.8
 --- sbin/mount_nfs.orig/mount_nfs.8	Thu Feb 10 10:19:30 2005
 +++ sbin/mount_nfs/mount_nfs.8	Sun Sep 10 12:37:51 2006
 @@ -36,7 +36,7 @@
  .Nd mount NFS file systems
  .Sh SYNOPSIS
  .Nm
 -.Op Fl 23bcdiLlNPsTU
 +.Op Fl 23bBcdiLlNPsTU
  .Op Fl a Ar maxreadahead
  .Op Fl D Ar deadthresh
  .Op Fl g Ar maxgroups
 @@ -163,6 +163,11 @@
  Useful for
  .Xr fstab 5 ,
  where the file system mount is not critical to multiuser operation.
 +.It Fl B
 +Fork off a child immediately, even before the first attempt to contact the
 +server. Useful for
 +.Xr fstab 5 ,
 +where notification about failiure is not desired.
  .It Fl c
  For UDP mount points, do not do a
  .Xr connect 2 .
 diff -Pur sbin/mount_nfs.orig/mount_nfs.c sbin/mount_nfs/mount_nfs.c
 --- sbin/mount_nfs.orig/mount_nfs.c	Fri Jun 10 11:51:41 2005
 +++ sbin/mount_nfs/mount_nfs.c	Sun Sep 10 12:38:50 2006
 @@ -260,7 +260,7 @@
  	nfsargs = nfsdefargs;
  	nfsargsp = &nfsargs;
  	while ((c = getopt(argc, argv,
 -	    "23a:bcdD:g:I:iLlNo:PR:r:sTt:w:x:U")) != -1)
 +	    "23a:bBcdD:g:I:iLlNo:PR:r:sTt:w:x:U")) != -1)
  		switch (c) {
  		case '2':
  			mountmode = V2;
 @@ -278,6 +278,14 @@
  		case 'b':
  			opflags |= BGRND;
  			break;
 +		case 'B':
 +			opflags |= BGRND;
 +			if ((opflags & (BGRND | ISBGRND)) == BGRND) {
 +				opflags |= ISBGRND;
 +				if (daemon(0, 0) != 0)
 +					err(1, "daemon");
 +			}
 +			break;
  		case 'c':
  			nfsargsp->flags |= NFSMNT_NOCONN;
  			break;
 @@ -918,7 +926,7 @@
  usage()
  {
  	(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
 -"usage: mount_nfs [-23bcdiLlNPsTU] [-a maxreadahead] [-D deadthresh]",
 +"usage: mount_nfs [-23bBcdiLlNPsTU] [-a maxreadahead] [-D deadthresh]",
  "                 [-g maxgroups] [-I readdirsize] [-o options] [-R retrycnt]",
  "                 [-r readsize] [-t timeout] [-w writesize] [-x retrans]",
  "                 rhost:path node");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609101050.k8AAoM6S025407>