Improve the warnings for dump -L and do not bother doing the snapshot if
it is specified for read-only filesystems. Submitted by: Jason Young <jyoung8607@hotmail.com> PR: 46672
This commit is contained in:
parent
01487d9cea
commit
92223ccc32
@ -211,6 +211,7 @@ takes a snapshot of the file system in the
|
||||
directory in the root of the filesystem being dumped and
|
||||
then does a dump of the snapshot.
|
||||
The snapshot is removed when the dump is complete.
|
||||
This option is ignored for unmounted or read-only filesystems.
|
||||
If the
|
||||
.Pa .snap
|
||||
directory does not exist in the root of the filesystem being dumped,
|
||||
|
@ -309,9 +309,16 @@ main(int argc, char *argv[])
|
||||
spcl.c_filesys[NAMELEN-1]='\0';
|
||||
|
||||
if ((mntpt = getmntpt(disk, &mntflags)) != 0) {
|
||||
if (snapdump == 0) {
|
||||
msg("WARNING: %s\n",
|
||||
"should use -L when dumping live filesystems!");
|
||||
if (mntflags & MNT_RDONLY) {
|
||||
if (snapdump != 0) {
|
||||
msg("WARNING: %s\n",
|
||||
"-L ignored for read-only filesystem.");
|
||||
snapdump = 0;
|
||||
}
|
||||
} else if (snapdump == 0) {
|
||||
msg("WARNING: %s%s\n",
|
||||
"should use -L when dumping live read-write ",
|
||||
"filesystems!");
|
||||
} else {
|
||||
char snapname[BUFSIZ], snapcmd[BUFSIZ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user