[RFC] Core Update 163: Abort update.sh in case an uninitialised variable is found
Commit Message
This should never happen anyways, but better be safe than sorry.
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
config/rootfiles/core/163/update.sh | 3 +++
1 file changed, 3 insertions(+)
Comments
Why?
> On 3 Dec 2021, at 17:37, Peter Müller <peter.mueller@ipfire.org> wrote:
>
> This should never happen anyways, but better be safe than sorry.
>
> Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
> ---
> config/rootfiles/core/163/update.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/config/rootfiles/core/163/update.sh b/config/rootfiles/core/163/update.sh
> index e51dbf0b3..c1f23f25e 100644
> --- a/config/rootfiles/core/163/update.sh
> +++ b/config/rootfiles/core/163/update.sh
> @@ -24,6 +24,9 @@
> . /opt/pakfire/lib/functions.sh
> /usr/local/bin/backupctrl exclude >/dev/null 2>&1
>
> +# Abort in case of uninitialised variables
> +set -u
> +
> core=163
>
> exit_with_error() {
> --
> 2.26.2
@@ -24,6 +24,9 @@
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
+# Abort in case of uninitialised variables
+set -u
+
core=163
exit_with_error() {