Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4936

Raspberry Pi OS • Re: /usr/bin/sh being linked to dash not bash makes script fail under "at"

$
0
0
I just know that when I change the /usr/bin/sh symlink to point to bash instead of dash, my script works under at. I have no idea what havoc this might cause for other user scripts, or for Raspberry Pi OS itself.
It likely would not cause any issues to run system scripts under bash instead of dash. But you should not change the symlink. For one thing, it will change back every time there is an update to the dash package, breaking all your scripts again.

Is your script executable (chmod +x)? The #! line will not work if not. I think the only bash-isms are that you used [[ ]] instead of [ ], and &> instead of (in this case) 2>.

I see you have already discovered that replacing system files is not expected or supported. There is almost certainly a better way to change the splash screen, without getting into a fight with the OS. However I do not use it, so I cannot test.

By the way, it is /bin/sh, /bin/dash, and /bin/bash. On current systems /bin is a symlink to usr/bin, so it does not make much difference. But the packaging system still remembers the official paths, and commands like dpkg -S /bin/sh will fail if you add /usr.

Statistics: Posted by jojopi — Tue Aug 06, 2024 5:16 pm



Viewing all articles
Browse latest Browse all 4936

Trending Articles