[Cuis-dev] installing cuis on OpenBSD, bash vs sh?

lewis at mail.msen.com lewis at mail.msen.com
Tue Jan 30 13:21:14 PST 2024


On 2024-01-30 15:40, ken.dickey--- via Cuis-dev wrote:

> On 2024-01-30 07:18, rsykora--- via Cuis-dev wrote:
> ..
> 
>> But at this moment I just found that the
>> clonePackageRepos.sh
>> script under
>> Cuis-Smalltalk-Dev/
>> tries to run bash.
> 
> So when you edit the script from "/bin/bash" to location of `which sh`
> is there a problem?
> 
> [Warning: not an OpenBSD user]
> -KenD

No it is not a problem. As a general rule, it is good to specify
#!/bin/sh in scripts whenever this is sufficient, and to specify e.g.
#!/bin/bash only if you intend to use features that are not present in
a minimal /bin/sh. There are two reasons for this, first for portability
because any unix-like operating system will have a functioning /bin/sh
available, and second for security because feature-rich shells are more
likely to be subject to security holes, and distro maintainers take care
to link a simple and secure shell to /bin/sh.

If you are on a unix-like system and execute the command "type /bin/sh"
you will usually find it linked to something other than /usr/bin/bash.
This is because of the security concern.

Dave





More information about the Cuis-dev mailing list