guix-install.sh: Convert sysv-init to SYSV_INIT_REQUIRE to match variable name.

See <https://lists.gnu.org/archive/html/bug-guix/2024-06/msg00145.html>.
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 <garbados@gmail.com>
Change-Id: Ic41de6fba7ef37dff479728aebefaa8cb148315e
This commit is contained in:
Maxim Cournoyer 2025-02-28 11:22:13 +09:00
parent 55a5181e74
commit 99bf56fd50
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -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.