diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-04-30 14:34:02 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-04-30 14:34:02 +0000 |
commit | f7da1f817716ce3d1ec0503f9f581b865269d462 (patch) | |
tree | 1f3914b0b8e039e75b12f4bd7adf5110fe9186d3 /tools/vgrename.c | |
parent | eddc0f3307be5fcbd7a220512643053ad2ed6183 (diff) | |
download | lvm2-f7da1f817716ce3d1ec0503f9f581b865269d462.tar.gz lvm2-f7da1f817716ce3d1ec0503f9f581b865269d462.tar.xz lvm2-f7da1f817716ce3d1ec0503f9f581b865269d462.zip |
Don't touch /dev in vgrename if activation is disabled.
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r-- | tools/vgrename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c index 03acbee0..eafcdab6 100644 --- a/tools/vgrename.c +++ b/tools/vgrename.c @@ -122,7 +122,7 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, sprintf(old_path, "%s%s", dev_dir, vg_name_old); sprintf(new_path, "%s%s", dev_dir, vg_name_new); - if (dir_exists(old_path)) { + if (activation() && dir_exists(old_path)) { log_verbose("Renaming \"%s\" to \"%s\"", old_path, new_path); if (test_mode()) log_verbose("Test mode: Skipping rename."); |