Skip to content

Commit

Permalink
Packaging: fix preremove script preventing upgrades on RHEL based OS.
Browse files Browse the repository at this point in the history
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
  • Loading branch information
wilfriedroset committed Oct 5, 2023
1 parent ffd7c41 commit 9981241
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* [BUGFIX] Query-scheduler: don't retain connections from queriers that have shut down, leading to gradually increasing enqueue latency over time. #6100 #6145
* [BUGFIX] Ingester: prevent query logic from continuing to execute after queries are canceled. #6085
* [BUGFIX] Ensure correct nesting of children of the `querier.Select` tracing span. #6085
* [BUGFIX] Packaging: fix preremove script preventing upgrades on RHEL based OS. #6067

### Mixin

Expand Down
12 changes: 9 additions & 3 deletions packaging/nfpm/mimir/preremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,24 @@ upgrade() {
:
}

purge() {
:
}

# Step 2, check if this is a clean install or an upgrade
action="$1"

case "$action" in
"0" | "remove")
uninstall
;;
"2" | "upgrade")
"1" | "upgrade")
upgrade
;;
"purge")
purge
;;
*)
echo "Unsupported action: ${action}"
exit 1
echo "Unsupported action: ${action}. ignoring."
;;
esac

0 comments on commit 9981241

Please sign in to comment.