Whamcloud - gitweb
EX-7968 utils: lamigo to accept multi-word args
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 26 Jul 2023 13:20:38 +0000 (16:20 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 29 Jul 2023 07:58:31 +0000 (07:58 +0000)
so we can put something like the following into the config file:
mirror-cmd=lfs mirror extend -N --stats --stats-interval=1 -W1M

Test-Parameters: trivial testlist=hot-pools

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib01c4b4c76a46ee44189cc6fa763306b059886b3
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51768
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lipe/src/lamigo.c
lustre/tests/hot-pools.sh

index 4e70d09..3beabfa 100644 (file)
@@ -2526,7 +2526,7 @@ static void load_config(char *name)
                }
                if (opt->has_arg == required_argument ||
                    opt->has_arg == optional_argument) {
-                       optarg = strsep(&s, "\n ");
+                       optarg = strsep(&s, "\n");
                        if (!optarg &&
                            opt->has_arg == required_argument)
                                LX_FATAL("option '%s' requires an argument\n", t);
index 941a3f0..e9c1300 100755 (executable)
@@ -358,7 +358,7 @@ create_one_lamigo_cfg() {
                [[ -z \\\"$LAMIGO_EXTRA\\\" ]] ||
                        echo \\\"$LAMIGO_EXTRA\\\" >> $cfg_file;
                [[ -z \\\"$LAMIGO_MIRROR_CMD\\\" ]] ||
-                       echo mirror-cmd=\'$LAMIGO_MIRROR_CMD\' >> $cfg_file;
+                       echo mirror-cmd=$LAMIGO_MIRROR_CMD >> $cfg_file;
                [[ -z \\\"$LAMIGO_DUMP\\\" ]] ||
                        echo dump=\\\"${LAMIGO_DUMP}.$mdt\\\" >> $cfg_file;
                ! $LAMIGO_DEBUG || echo debug >> $cfg_file;