From 48de2407c9f6af2141f64dfa6b440d23c4f69f15 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Sat, 6 May 2023 15:16:17 +0800 Subject: [PATCH] LU-16232 script: fix the argument parse The issue makes script skip other arguments if the special parameter is not last one. Lustre-change: https://review.whamcloud.com/50876 Lustre-commit: 99144a595b767ef79acec058c838759bea73c579 Test-Parameter: trival Fixes: b533700add (LU-16232 scripts: changelog/updatelog emergency cleanup) Signed-off-by: Yang Sheng Change-Id: Ia309e7b6f1a62e76b80851848601c3d0b03be8b2 Reviewed-by: Mikhail Pershin Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58012 Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/scripts/remove_changelog | 2 +- lustre/scripts/remove_updatelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/scripts/remove_changelog b/lustre/scripts/remove_changelog index 0bda063..07650c6 100755 --- a/lustre/scripts/remove_changelog +++ b/lustre/scripts/remove_changelog @@ -71,7 +71,7 @@ while [ -n "$*" ]; do -q|--quiet) ECHO=:;; -z|--zip) OPT_ARCH="$2.tar"; shift;; *) - [ -e "$arg" ] && OPT_MOUNT="$arg" && break + [ -d "$arg" ] && OPT_MOUNT="$arg";; esac shift done diff --git a/lustre/scripts/remove_updatelog b/lustre/scripts/remove_updatelog index 2fad732..1d41f88 100755 --- a/lustre/scripts/remove_updatelog +++ b/lustre/scripts/remove_updatelog @@ -72,7 +72,7 @@ while [ -n "$*" ]; do -q|--quiet) ECHO=:;; -z|--zip) OPT_ARCH="$2.tar"; shift;; *) - [ -e "$arg" ] && OPT_MOUNT="$arg" && break + [ -d "$arg" ] && OPT_MOUNT="$arg";; esac shift done -- 1.8.3.1