Skip to content
Snippets Groups Projects
Commit a45f3cb8 authored by Martin Pitt's avatar Martin Pitt
Browse files

- Do not fail if cluster is already (start)/not (stop) running to conform

    to LSB.
  - Thanks to Peter Eisentraut for the original patch.
parent 44efaf56
No related branches found
No related tags found
No related merge requests found
......@@ -37,10 +37,12 @@ postgresql-common (44) unstable; urgency=low
- Use log_daemon_msg/log_progress_msg to show all clusters of a particular
version on the same line, to better conform to standards.
- Call restart instead of stop/start.
- Thanks to Peter Eisentraut for the patch.
- Do not fail if cluster is already (start)/not (stop) running to conform
to LSB.
- Thanks to Peter Eisentraut for the original patch.
- Closes: #355004
-- Martin Pitt <mpitt@debian.org> Sun, 12 Mar 2006 09:46:13 +0100
-- Martin Pitt <mpitt@debian.org> Sun, 12 Mar 2006 09:57:57 +0100
postgresql-common (43) unstable; urgency=low
......
......@@ -13,7 +13,7 @@ do_ctl_all() {
[ "$(ls /etc/postgresql/$2)" ] || return
[ -x "/usr/lib/postgresql/$2/bin/postmaster" ] || return
status=0
status=0
log_daemon_msg "$3"
for c in /etc/postgresql/"$2"/*; do
[ -e "$c/pgdata" ] || continue
......@@ -28,12 +28,14 @@ do_ctl_all() {
[ "$start" = "auto" ] || continue
log_progress_msg "$name"
pg_ctlcluster "$2" "$name" $1 >/dev/null
status=$(($status || $?))
ERRMSG=$(pg_ctlcluster "$2" "$name" $1 2>&1)
res=$?
# Do not fail on success or if cluster is already/not running
[ $res -eq 0 ] || [ $res -eq 2 ] || status=$(($status || $res))
done
log_end_msg $status
if [ "$fail" ]; then
[ -z "$ERRMSG" ] || echo -e "\n$ERRMSG" >&2
if [ $status -ne 0 ]; then
[ -z "$ERRMSG" ] || echo "$ERRMSG" >&2
exit 1
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment