From f363cf78575cc4c54dee5801274e55d07e0971b1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 21 Feb 2016 19:06:37 +1000 Subject: repo-add: do not alter the database if only verifying signature Fixes FS#48085. Signed-off-by: Allan McRae --- scripts/repo-add.sh.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index cab5e048..d62f9c4d 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -798,6 +798,17 @@ fi check_xdelta +if (( VERIFY && ${#args[@]} == 1 )); then + for repo in "db" "files"; do + dbfile=${repodir}/$REPO_DB_PREFIX.$repo.$REPO_DB_SUFFIX + + if [[ -f $dbfile ]]; then + verify_signature "$dbfile" + fi + done + exit 0 +fi + prepare_repo_db for arg in "${args[@]:1}"; do -- cgit v1.2.3-24-g4f1b