The fake option has to write to mtab like a normal mount. Read mount(8) man
page for more details. It's very important for system init scripts that use
"-f" as a way how write info about mount points to /etc/mtab.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
start_statd();
}
- if (fake)
- return 0;
if (mnt_err)
exit(EX_FAIL);
- mnt_err = do_mount_syscall(spec, mount_point,
- nfs_mount_vers == 4 ? "nfs4" : "nfs",
- flags, mount_opts);
-
- if (mnt_err) {
- mount_error(mount_point);
- exit(EX_FAIL);
+ if (!fake) {
+ mnt_err = do_mount_syscall(spec, mount_point,
+ nfs_mount_vers == 4 ? "nfs4" : "nfs",
+ flags, mount_opts);
+
+ if (mnt_err) {
+ mount_error(mount_point);
+ exit(EX_FAIL);
+ }
}
if (!nomtab)