mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
vgchange: require confirmation with -c and no VGs
Too many people have been running 'vgchange -cy' by mistake so add a confirmation prompt. Use --yes to bypass this.
This commit is contained in:
parent
fd7cac15bc
commit
1a1d3a10ff
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.101 -
|
Version 2.02.101 -
|
||||||
===================================
|
===================================
|
||||||
|
Require confirmation for vgchange -c when no VGs listed explicitly.
|
||||||
Also skip /var and /var/log by default in blkdeactivate when unmounting.
|
Also skip /var and /var/log by default in blkdeactivate when unmounting.
|
||||||
Add support for bind mounts in blkdeactivate.
|
Add support for bind mounts in blkdeactivate.
|
||||||
Add blkdeactivate -v/--verbose for debug output from external tools used.
|
Add blkdeactivate -v/--verbose for debug output from external tools used.
|
||||||
|
@ -623,6 +623,12 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
return ECMD_PROCESSED;
|
return ECMD_PROCESSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arg_count(cmd, clustered_ARG) && !argc && !arg_count(cmd, yes_ARG) &&
|
||||||
|
(yes_no_prompt("Change clustered property of all volumes groups? [y/n]: ") == 'n')) {
|
||||||
|
log_error("No volume groups changed.");
|
||||||
|
return ECMD_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
if (!update || !update_partial_unsafe)
|
if (!update || !update_partial_unsafe)
|
||||||
cmd->handles_missing_pvs = 1;
|
cmd->handles_missing_pvs = 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user