Keep trying if an NFS mount fails, and eliminate a call to exit(3).
This commit is contained in:
parent
1b6cff3df4
commit
93ba60f01d
9
mount.c
9
mount.c
@ -479,10 +479,9 @@ singlemount:
|
|||||||
if (strchr(device, ':') != NULL)
|
if (strchr(device, ':') != NULL)
|
||||||
filesystemType = "nfs";
|
filesystemType = "nfs";
|
||||||
if (strcmp(filesystemType, "nfs") == 0) {
|
if (strcmp(filesystemType, "nfs") == 0) {
|
||||||
rc = nfsmount (device, directory, &flags,
|
if (nfsmount (device, directory, &flags, &extra_opts,
|
||||||
&extra_opts, &string_flags, 1);
|
&string_flags, 1)) {
|
||||||
if ( rc != 0) {
|
perror_msg("nfsmount failed");
|
||||||
perror_msg_and_die("nfsmount failed");
|
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -500,7 +499,7 @@ singlemount:
|
|||||||
if (all == FALSE && fstabmount == TRUE && directory == NULL)
|
if (all == FALSE && fstabmount == TRUE && directory == NULL)
|
||||||
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
|
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
|
||||||
|
|
||||||
exit(rc);
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto singlemount;
|
goto singlemount;
|
||||||
|
@ -479,10 +479,9 @@ singlemount:
|
|||||||
if (strchr(device, ':') != NULL)
|
if (strchr(device, ':') != NULL)
|
||||||
filesystemType = "nfs";
|
filesystemType = "nfs";
|
||||||
if (strcmp(filesystemType, "nfs") == 0) {
|
if (strcmp(filesystemType, "nfs") == 0) {
|
||||||
rc = nfsmount (device, directory, &flags,
|
if (nfsmount (device, directory, &flags, &extra_opts,
|
||||||
&extra_opts, &string_flags, 1);
|
&string_flags, 1)) {
|
||||||
if ( rc != 0) {
|
perror_msg("nfsmount failed");
|
||||||
perror_msg_and_die("nfsmount failed");
|
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -500,7 +499,7 @@ singlemount:
|
|||||||
if (all == FALSE && fstabmount == TRUE && directory == NULL)
|
if (all == FALSE && fstabmount == TRUE && directory == NULL)
|
||||||
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
|
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
|
||||||
|
|
||||||
exit(rc);
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto singlemount;
|
goto singlemount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user