Summary: | x11-apps/xinit: /etc/X11/startDM.sh needs /bin/bash, not /bin/sh | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Raffaello D. Di Napoli <rafdev> |
Component: | [OLD] Unspecified | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Changes #!/bin/sh to #!/bin/bash |
Description
Raffaello D. Di Napoli
2009-09-03 18:03:43 UTC
Created attachment 203065 [details, diff]
Changes #!/bin/sh to #!/bin/bash
This solves the problem.
I think I'd rather make the script dash/posix compliant rather than force the dep on bash. If you could write a patch to do that, I'll gladly commit it here and upstream. Thanks Well, that was my first thought, but I then noticed that the dependency on bash is brought in by sourcing /etc/init.d/functions.sh, which is heavily bash-dependent. While I am willing and planning to make functions.sh bash-free, that’s a major work I can’t find much time for these days. So, until functions.sh is made bash-free, I’d rather consider changing the shebang line in startDM.sh. (In reply to comment #3) > Well, that was my first thought, but I then noticed that the dependency on bash > is brought in by sourcing /etc/init.d/functions.sh, which is heavily > bash-dependent. While I am willing and planning to make functions.sh bash-free, > that’s a major work I can’t find much time for these days. > So, until functions.sh is made bash-free, I’d rather consider changing the > shebang line in startDM.sh. Or, does startDM.sh really need functions.sh? If so, we'll just change the shebang :) Thanks (In reply to comment #4) > Or, does startDM.sh really need functions.sh? If so, we'll just change the > shebang :) Okay, I checked more carefully. It does depend on functions.sh both directly and indirectly, by sourcing /lib/rcscripts/sh/rc-services.sh, which sources functions.sh and depends on bash itself. Of the few commands executed by startDM.sh, almost all of them are defined in rc-services.sh, and a few from functions.sh. So I think startDM.sh will be POSIX compliant only when the whole rc scripts system will be purified from bash-isms. That wont happen. Openrc will be using bash. From what i can see the .sh script itself is posix ok. (In reply to comment #6) > That wont happen. > Openrc will be using bash. Well, then any script sourcing any of its files should declare explicit bash dependency, shouldn’t it? (In reply to comment #6) > That wont happen. > Openrc will be using bash. > From what i can see the .sh script itself is posix ok. Actually, from what I was told in another bug report (#284221), OpenRC pulled in by baselayout-2 *is* bash-free, so I emerged it and I got (among everything else) a functions.sh that doesn’t need bash, so now startDM.sh is indeed entirely POSIX compliant. I’m marking this bug as invalid, as that’s what one of you guys did with the other bug I filed on the same subject. |