-
Notifications
You must be signed in to change notification settings - Fork 38
packaging/scripts: Fix shebang #2100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Include script header after type specific scriptlet to ensure type specific shebang is used. Fixes: 19ccbed ("Adjusted detection of systemd in package scriptlets to handle more valid states")
|
Thank you for submitting a PR! Maybe @craigcomstock can review this? |
|
@btriller thanks for the contribution, can you describe where and how you saw this as a problem? Thanks! |
Debian Trixie/CFEngine Community 3.27.0 |
|
I didn't dig deeper but we have some hosts that didn't have |
|
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622094 |
craigcomstock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't see any mention of how the as-is code causes a problem. It would be good to mention what caused you to work on this change in the first place. I assume there was a problem you encountered?
| # action = <install|remove> | ||
| # | ||
| # script-header.sh | ||
| # <type>-script-common.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -script-common.sh relies on use_systemd function in script-header.sh so this change will break things I think.
Rather the fix might be to put the shebang at the top of script-header.sh and leave the order as-is.
Only bff-script-common.sh does not use /bin/sh but rather /usr/bin/ksh so that would need refactoring as well.
Include script header after type specific scriptlet to ensure type specific shebang is used.
Fixes: 19ccbed ("Adjusted detection of systemd in package scriptlets to handle more valid states")