mirror of
https://github.com/lldap/lldap.git
synced 2026-04-26 00:36:01 +03:00
[GH-ISSUE #937] [BUG] generate_secrets.sh does not run when default shell is dash #344
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ChevySSinSD on GitHub (Jul 23, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/937
Describe the bug
The generate_secrets.sh does not run in recent Debian-based distributions, generating this error:
./generate_secrets.sh: 3: Syntax error: "(" unexpectedAdditional Context
The shebang on line 1 calls the default shell:
#! /bin/shHowever, the function definition on line 3 uses the bash convention, which is not compatible with dash, the default shell for recent Debian-based linux distributions (and others):
function print_random () {I have modified generate_secrets.sh in two separate ways, both solutions work on Debian:
#! /bin/bashprint_random () {(i.e., remove "function" in front of the function definition). Reference: Function Definition Command.@nitnelave commented on GitHub (Jul 23, 2024):
Sounds good! Can you make a PR with change number 2? Let's keep it POSIX and as compatible as possible.
@ChevySSinSD commented on GitHub (Jul 23, 2024):
Will do