From aedeaa40d1cf5eb687a575b322a09a9a48ced623 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Jul 2012 22:02:35 +0200 Subject: mount: (new) add --source and --target In some cases (for example if only one mount argument is given) may be mount request ambivalent: # mount /foo and fstab: /dev/sda5 /foo rw 0 0 /foo /bar bind 0 0 the new options allows to be more explicit # mount --target /foo (mounts /dev/sda5) # mount --source /foo (binds /foo to /bar) It's possible to use the options together # mount --source /dev/sda2 --target /home Signed-off-by: Karel Zak --- sys-utils/mount.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'sys-utils/mount.8') diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 index 3ddd3f155..c8b6f41c8 100644 --- a/sys-utils/mount.8 +++ b/sys-utils/mount.8 @@ -99,7 +99,19 @@ If only directory or device is given, for example: .RE then mount looks for a mountpoint and if not found then for a device in the -/etc/fstab file. +/etc/fstab file. It's possible to use +.B --target +or +.B --source +options to avoid ambivalent interpretation of the given argument. For example +.RS + +.br +.BI "mount --target /mountpoint" +.br + +.RE + .B The listing and help. .RS @@ -557,6 +569,10 @@ Tolerate sloppy mount options rather than failing. This will ignore mount options not supported by a filesystem type. Not all filesystems support this option. This option exists for support of the Linux autofs\-based automounter. +.IP "\fB\-\-source \fIsrc\fP" +If only one argument for the mount command is given then the argument might be +interpreted as target (mountpoint) or source (device). This option allows to +explicitly define that the argument is mount source. .IP "\fB\-r, \-\-read\-only\fP" Mount the filesystem read-only. A synonym is .BR "\-o ro" . @@ -733,6 +749,10 @@ mounts all filesystems except those of type and .IR ext . .RE +.IP "\fB\-\-target \fIdir\fP" +If only one argument for the mount command is given then the argument might be +interpreted as target (mountpoint) or source (device). This option allows to +explicitly define that the argument is mount target. .IP "\fB\-O, \-\-test-opts \fIopts\fP" Used in conjunction with .BR \-a , -- cgit v1.2.3-55-g7522