patch to 15.0 /etc/profile and /etc/profile.d for Bourne errors during login
/etc/profile "contains system-wide defaults used by all Bourne (and related) shells".
This is mostly true. Most of /etc/profile and its children in /etc/profile.d is strictly compliant to Bourne. A few non-Bourne idioms have crept in. The patches below prevent Bourne shell from throwing errors during login. Code:
--- /etc/profile.orig 2021-08-30 18:05:00.000000000 +0000 Code:
--- /etc/profile.d/coreutils-dircolors.sh.orig 2021-09-27 17:59:53.000000000 +0000 Code:
--- /etc/profile.d/lang.sh.orig 2022-03-14 14:47:01.722115263 +0000 Code:
--- /etc/profile.d/libglib2.sh.orig 2021-09-01 17:51:06.000000000 +0000 Code:
--- /etc/profile.d/vdpau.sh.orig 2015-03-14 21:20:20.000000000 +0000 |
Excuse me, BUT you tested those patches?
True, you found some bashismes, BUT from what I know - and I use Linux since really long time (and not necessarily Slackware), the variables export fully compatible with the Bourne Shell should be something like this Code:
VDPAU_LOG=0 On contrary, you do something like this Code:
export VDPAU_LOG ; VDPAU_LOG=0 Even IF this works (which I sincerely doubt), God knows what shell you use if it accepts this.... ;) |
It does work, insofar as I've tested: setting a variable after the export command, invoking another shell, and checking the value of the variable.
But setting the variable first has long been the standard way of doing things, if my copy of The UNIX System (Bourne, 1983) is to be believed. |
I'm a little curious about the coreutils-dircolors.sh patch.
I know the list of shells in the "elif" statements comes from /etc/profile, but it seems a bit counter-intuitive to leave other shells without an ls alias (particularly dash, which, although a counter-intuitive choice for an interactive shell, comes with a full installation of Slackware; /bin/ash is now a symlink to /bin/dash anyway). pdksh was the original Slackware *ksh, but it doesn't seem to have been provided for over twenty years. |
I looked all the way back to SLS to see if I could blame that false statement on somebody else. ;-) It still doesn't strike me as something I'd write, but who knows -- it's old in any case.
This is probably the only patch that's needed: Code:
--- /etc/profile.orig 2021-08-30 13:05:00.000000000 -0500 |
Pat -- :)
:) You forgot your smiley :) -- kjh :) |
All times are GMT -5. The time now is 12:24 AM. |