1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-04-19 06:50:42 +03:00

systemd: lvm2-activation-generator: remove default dir if args not specified and require all args to be given

Remove default "/tmp" as destination directory if no args
specified for lvm2-activation-generator. Require all the
args to be specified directly for proper functionality.
This commit is contained in:
Peter Rajnoha 2013-08-28 16:06:51 +02:00
parent c9258e7f2e
commit 0acd7173d1
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.101 -
===================================
Require exactly 3 arguments for lvm2-activation-generator, remove defaults.
Disable pvmove of merging or converting logical volumes.
Enable pvmove of snapshots and snapshot origins.
Fix inability to specify LV name when pvmove'ing a RAID, mirror, or thin-LV.

View File

@ -27,7 +27,6 @@
#define KMSG_DEV_PATH "/dev/kmsg"
#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
#define DEFAULT_UNIT_DIR "/tmp"
#define UNIT_TARGET_LOCAL_FS "local-fs.target"
#define UNIT_TARGET_REMOTE_FS "remote-fs.target"
@ -174,8 +173,8 @@ int main(int argc, char *argv[])
kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY);
if (argc > 1 && argc != 4) {
kmsg(LOG_ERR, "LVM: Activation generator takes three or no arguments.\n");
if (argc != 4) {
kmsg(LOG_ERR, "LVM: Incorrect number of arguments for activation generator.\n");
r = EXIT_FAILURE; goto out;
}
@ -183,7 +182,7 @@ int main(int argc, char *argv[])
if (lvm_uses_lvmetad())
goto out;
dir = argc > 1 ? argv[1] : DEFAULT_UNIT_DIR;
dir = argv[1];
if (!generate_unit(dir, UNIT_EARLY) ||
!generate_unit(dir, UNIT_MAIN) ||