From 01e9e3955a9c79387d64e69554fd6ecfce59b957 Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Tue, 23 May 2023 09:03:53 +0300 Subject: [PATCH] MDEV-31242: Make sure every Debian post/pre script is using bash Make sure that every post and pre script are using bash and have set -e in next to shebang. Command set -e makes sure that if script fails in one command it will fail whole script. --- debian/mariadb-common.postinst | 2 +- debian/mariadb-common.postrm | 2 +- debian/mariadb-plugin-mroonga.postinst | 2 +- debian/mariadb-plugin-mroonga.prerm | 2 +- debian/mariadb-server.preinst | 4 +++- debian/mariadb-server.prerm | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/mariadb-common.postinst b/debian/mariadb-common.postinst index 53d131a3929..0292a88c6f9 100644 --- a/debian/mariadb-common.postinst +++ b/debian/mariadb-common.postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/debian/mariadb-common.postrm b/debian/mariadb-common.postrm index 2548733a1b9..d807c63aec9 100644 --- a/debian/mariadb-common.postrm +++ b/debian/mariadb-common.postrm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/debian/mariadb-plugin-mroonga.postinst b/debian/mariadb-plugin-mroonga.postinst index fea327c204d..7c6da36391b 100644 --- a/debian/mariadb-plugin-mroonga.postinst +++ b/debian/mariadb-plugin-mroonga.postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/debian/mariadb-plugin-mroonga.prerm b/debian/mariadb-plugin-mroonga.prerm index 54cba1e74ff..0fde33765e8 100644 --- a/debian/mariadb-plugin-mroonga.prerm +++ b/debian/mariadb-plugin-mroonga.prerm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/debian/mariadb-server.preinst b/debian/mariadb-server.preinst index eb0b825ca28..418273bbb27 100644 --- a/debian/mariadb-server.preinst +++ b/debian/mariadb-server.preinst @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # # summary of how this script can be called: # * install @@ -7,6 +7,8 @@ # * abort-upgrade # +set -e + # shellcheck source=/dev/null . /usr/share/debconf/confmodule diff --git a/debian/mariadb-server.prerm b/debian/mariadb-server.prerm index 2701fa5fc36..e46f1d7817a 100644 --- a/debian/mariadb-server.prerm +++ b/debian/mariadb-server.prerm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e #DEBHELPER#