diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-28 11:22:13 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-28 13:36:44 +0900 |
commit | 99bf56fd509eccc8281667be38494db2fc01ffd2 (patch) | |
tree | 29145ccc65aaeed294ae5c8534cd5c8c3bd106bc | |
parent | 55a5181e745131e5369beaf59d4d406da92b5617 (diff) | |
download | guix-99bf56fd509eccc8281667be38494db2fc01ffd2.tar.gz guix-99bf56fd509eccc8281667be38494db2fc01ffd2.zip |
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
-rwxr-xr-x | etc/guix-install.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 297a726ad6..8887204df4 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. |