From c825915c083bd9dac7bf68cf530c9939c7e54911 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 25 Dec 2024 21:45:34 +0100 Subject: [PATCH] Explicitly use bash everywhere include/library contains bashsims like ${x//} or while...done < <(cmd) This causes failure when dash-sh is installed in openSUSE, like so: /usr/lib/bootloader/grub2-efi/config: 314: /usr/lib/bootloader/include/library: Syntax error: redirection unexpected --- grub2-efi/install | 2 +- grub2/add-option | 2 +- grub2/config | 2 +- grub2/default | 2 +- grub2/default-settings | 2 +- grub2/del-option | 2 +- grub2/get-option | 2 +- grub2/install | 2 +- include/library | 2 ++ systemd-boot/add-kernel | 2 +- systemd-boot/add-option | 2 +- systemd-boot/config | 2 +- systemd-boot/default | 2 +- systemd-boot/default-settings | 2 +- systemd-boot/del-option | 2 +- systemd-boot/get-option | 2 +- systemd-boot/install | 2 +- systemd-boot/remove-kernel | 2 +- 18 files changed, 19 insertions(+), 17 deletions(-) diff --git a/grub2-efi/install b/grub2-efi/install index 0901460..a78035e 100755 --- a/grub2-efi/install +++ b/grub2-efi/install @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/add-option b/grub2/add-option index beda2b4..238b7eb 100755 --- a/grub2/add-option +++ b/grub2/add-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/config b/grub2/config index 94ef8d0..50f3c54 100755 --- a/grub2/config +++ b/grub2/config @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/default b/grub2/default index f50c45f..8b5f4f8 100755 --- a/grub2/default +++ b/grub2/default @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/default-settings b/grub2/default-settings index b663217..69f93ac 100755 --- a/grub2/default-settings +++ b/grub2/default-settings @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/del-option b/grub2/del-option index f9fc5e8..54c2d21 100755 --- a/grub2/del-option +++ b/grub2/del-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/get-option b/grub2/get-option index f8efa7d..3d98185 100755 --- a/grub2/get-option +++ b/grub2/get-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/grub2/install b/grub2/install index 0d9fe1d..64ef8fc 100755 --- a/grub2/install +++ b/grub2/install @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/include/library b/include/library index d039e3a..9364f4f 100644 --- a/include/library +++ b/include/library @@ -1,3 +1,5 @@ +# -*- bash -*- + # get out of POSIX mode in case we are running bash unset POSIXLY_CORRECT diff --git a/systemd-boot/add-kernel b/systemd-boot/add-kernel index d461598..80f565d 100755 --- a/systemd-boot/add-kernel +++ b/systemd-boot/add-kernel @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/add-option b/systemd-boot/add-option index 2df7585..9413a07 100755 --- a/systemd-boot/add-option +++ b/systemd-boot/add-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/config b/systemd-boot/config index 2aa41b9..38d6287 100755 --- a/systemd-boot/config +++ b/systemd-boot/config @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/default b/systemd-boot/default index 83e233e..2dade5f 100755 --- a/systemd-boot/default +++ b/systemd-boot/default @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/default-settings b/systemd-boot/default-settings index bd2e76a..bd29e29 100755 --- a/systemd-boot/default-settings +++ b/systemd-boot/default-settings @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/del-option b/systemd-boot/del-option index b6798ad..ed58ec3 100755 --- a/systemd-boot/del-option +++ b/systemd-boot/del-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/get-option b/systemd-boot/get-option index b67a31c..7fed68f 100755 --- a/systemd-boot/get-option +++ b/systemd-boot/get-option @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/install b/systemd-boot/install index a9a5a6c..34bd4db 100755 --- a/systemd-boot/install +++ b/systemd-boot/install @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case). diff --git a/systemd-boot/remove-kernel b/systemd-boot/remove-kernel index f6f4cfe..a942c96 100755 --- a/systemd-boot/remove-kernel +++ b/systemd-boot/remove-kernel @@ -1,4 +1,4 @@ -#! /usr/bin/sh +#! /usr/bin/bash # Settings from /etc/sysconfig/filename are available as environment vars # with the name 'SYS__FILENAME__KEY' (filename converted to upper case).