From 99bf56fd509eccc8281667be38494db2fc01ffd2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 28 Feb 2025 11:22:13 +0900 Subject: [PATCH] guix-install.sh: Convert sysv-init to SYSV_INIT_REQUIRE to match variable name. See . Thanks to Nyi Nyi Zaw for the patch. * etc/guix-install.sh (add_init_sys_require): Adjust value of INIT_SYS so that it matches the potential extra required arguments array name. Reported-by: Nyi Nyi Zaw Reported-by: Diana Belle Change-Id: Ic41de6fba7ef37dff479728aebefaa8cb148315e --- etc/guix-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 297a726ad6d..8887204df41 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -174,7 +174,12 @@ chk_require() add_init_sys_require() { # Add the elements of FOO_INIT_SYS to REQUIRE - local init_require="${INIT_SYS}_REQUIRE[@]" + + # Convert the init system command name captured in INIT_SYS in + # chk_init_sys to uppercase, with hyphens replaced by underscores. + local init_require=${INIT_SYS^^}_REQUIRE[@] + init_require=${init_require//-/_} + if [[ -n "$init_require" ]]; then # Have to add piecemeal because ${!foo[@]} performs direct array key # expansion, not indirect plain array expansion.