blob: f598a8da350f2d5a33fb88117290a75706ca5fdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
> Running `mount -fv /mnt/pnt` incorrectly updates /etc/mtab
This one is bogus.
Manpage:
=====
-f Causes everything to be done except for the actual system call;
if it's not obvious, this ``fakes'' mounting the file system. This option
is useful in conjunction with the -v flag to determine what the mount
command is trying to do. It can also be used to add entries for devices that
were mounted earlier with the -n option.
=====
Also, we need it in /etc/init.d/checkroot to regen /etc/mtab ...
=======================================================================
Running `mount -afvt type` incorrectly warns that 'nothing was mounted'
--- mount/mount.c
+++ mount/mount.c
#@@ -659,7 +659,7 @@
# if (verbose)
# print_one (&mnt);
#
#- if (!nomtab && mtab_is_writable()) {
#+ if (!fake && !nomtab && mtab_is_writable()) {
# if (flags & MS_REMOUNT)
# update_mtab (mnt.mnt_dir, &mnt);
# else {
@@ -1629,7 +1629,7 @@
case 0:
/* mount -a */
result = do_mount_all (types, options, test_opts);
- if (result == 0 && verbose)
+ if (result == 0 && verbose && !fake)
error(_("nothing was mounted"));
break;
|