Bug 107245 - Reinstate "automount" and added support features
Reinstate "automount" and added support features
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kudzu (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-15 23:02 EDT by Brian Harvey
Modified: 2014-03-16 22:39 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 14:17:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for updfstab.c and updfstab.8 (2.70 KB, patch)
2003-10-15 23:04 EDT, Brian Harvey
no flags Details | Diff

  None (edit)
Description Brian Harvey 2003-10-15 23:02:34 EDT
Description of problem: 

Reinstated updfstab's "automount" feature and added two 
more options to support it (users, sync). Patch contains man page update. Please 
consult for details.


Version-Release number of selected component (if applicable):0.99.99


How reproducible: Enhancement

Additional Info:

I respect that auto-unmounting is tricky, but I also believe that it's an issue
separate from auto mounting. Hence,why not use the auto mounting feature now?!
Comment 1 Brian Harvey 2003-10-15 23:04:33 EDT
Created attachment 95220 [details]
Patch for updfstab.c and updfstab.8
Comment 2 Brian Harvey 2003-10-21 21:02:14 EDT
Comment on attachment 95220 [details]
Patch for updfstab.c and updfstab.8

--- updfstab.8.orig	2003-10-15 10:52:25.000000000 -0400
+++ updfstab.8	2003-10-21 20:47:50.000000000 -0400
@@ -126,6 +126,18 @@
 \fB/dev\fR directory pointing to the actual device. This symbolic link
 is then used in \fB/etc/fstab\fR.

+.TP
+\fBautomount \fIval\fR
+If \fIval\fR is true, \fBupdfstab\fR will automatically mount the device
+on /mnt/\fBdevice\fR (or /mnt/\fBsymlink\fR, if specified).
+
+.TP
+\fBmountops \fIstring\fR
+If present, \fBupdfstab\fR appends \fIstring\fR to the options (fourth)
+field of \fB/etc/fstab\fR. Otherwise, the value "defaults" is appended. 
+\fIString\fR should be a comma-separated list of options as would normally 
+appear in \fB/etc/fstab\fR.
+

 .SH FILES
 .nf
--- updfstab.c.orig	2003-10-14 01:34:51.000000000 -0400
+++ updfstab.c	2003-10-21 20:51:45.000000000 -0400
@@ -48,6 +48,7 @@
     const char * name;
     int makeSymlink;
     int autoMount;
+    const char * mountOps;
     int skip;
     int noFstab;
     int defaultPartition;
@@ -730,7 +731,7 @@

	/* CD-RW hack! */
	if (!addition->device->type->noFstab)
-	    fprintf(output, "%-23s %-23s %-7s %-15s %d %d\n",
+	    fprintf(output, "%-23s %-23s %-7s %s%s %d %d\n",
		    deviceName,
		    addition->mountPoint,
		    !(strcmp(addition->device->type->name, "cdrom") &&
@@ -740,7 +741,8 @@
		    !(strcmp(addition->device->type->name, "cdrom") &&
		      strcmp(addition->device->type->name, "cdwriter") &&
		      strcmp(addition->device->type->name, "cdrw")) ?
-		    "noauto,owner,kudzu,ro" : "noauto,owner,kudzu",
+		    "noauto,kudzu,ro," : "noauto,kudzu,",
+		    (addition->device->type->mountOps) ?
(addition->device->type->mountOps) : "defaults",
		    0, 0);
     }

@@ -904,8 +906,12 @@
    right as we have to match strings from the fstab against strings from
    the configuration to see if automatic unmounting is the right thing to
    do or not */
+   
+/* re-enabled automount 2003-10-02, BH, added mountops too */
+   
 struct cfInfo cfOptions[] = {
-    /* {	"automount",	0,  BOOLEAN,	NONE },*/
+    {	"automount",	0,  BOOLEAN,	NONE },
+    {	"mountops",	0,  STRING,    NONE },
     {	"device",	0,  STRING,	STRING },
     {	"include",	0,  STRING,	NONE  },
     {	"match",	1,  STRING,	STRINGOPT },
@@ -1063,6 +1069,11 @@
	    item->defaultPartition = intArg1;
	} else if (!strcmp(lineArgv[0], "automount")) {
	    item->autoMount = intArg1;
+	} else if (!strcmp(lineArgv[0], "mountops")) {
+		if (lineArgv[1])
+	      item->mountOps = strdup(lineArgv[1]);
+	    else
+	      item->mountOps = NULL;
	} else if (!strcmp(lineArgv[0], "skip")) {
	    item->skip = intArg1;
	} else if (!strcmp(lineArgv[0], "nofstab")) {
Comment 3 Brian Harvey 2003-10-21 21:03:45 EDT
replaced original patch. removed "sync" and "user" options. replaced with more
generic "mountops" option
Comment 4 Bill Nottingham 2003-10-21 21:07:02 EDT
When adding patches, please add the patch as an attachment, not as inline, thanks.
Comment 5 Bill Nottingham 2005-04-19 14:17:50 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

As this feature has moved to HAL and fstab-sync, this will not be added to updfstab.

Note You need to log in before you can comment on or make changes to this bug.