You are not logged in.

#1 2018-11-13 14:14:55

framas
Member
Registered: 2009-07-24
Posts: 50

[SOLVED] Problems with variables in /etc/profile after upgrade

Hi there,

I got a strange problem about unset variables when launching a shell since upgrade my system yesterday:

Starting konsole with tmux and zsh.

/etc/profile.d/vte.sh:19: BASH_VERSION: parameter not set
/etc/profile.d/Z97-byobu.sh:40: LC_BYOBU: parameter not set
/etc/profile:35: BASH: parameter not set

$su -
Passwort:
-bash: LANG: unbound variable
-bash: ZSH_VERSION: unbound variable
-bash: DISPLAY: unbound variable
-bash: LD_LIBRARY_PATH: unbound variable
[root@hostname ~]#

I do then a complete rollback, but the problem persists. Does anyone have any idea what the problem is?

Thanks.

Last edited by framas (2018-11-14 07:16:49)

Offline

#2 2018-11-13 15:05:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Problems with variables in /etc/profile after upgrade

Yes, you've used `set -u` somewhere. Don't do that in the general case, and *definitely* don't do that in your interactive shell startup: http://mywiki.wooledge.org/BashFAQ/112

For much the same reason you shouldn't use `set -e`: https://mywiki.wooledge.org/BashFAQ/105

If some package upgrade triggered this, then you have a *really* bad package doing something incredibly wrong in an /etc/profile.d/* dropin.

Last edited by eschwartz (2018-11-13 15:07:46)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-11-14 07:15:58

framas
Member
Registered: 2009-07-24
Posts: 50

Re: [SOLVED] Problems with variables in /etc/profile after upgrade

Thank you, that was excatly the problem.
I've created a new sh file  under profile.d and vim-bash-support has in its default header template an set -o nounset included.

Thank you

Offline

#4 2018-11-14 14:11:57

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Problems with variables in /etc/profile after upgrade

Yeah, I don't recommend using anything ill-advised enough to use that by default.

Having quickly taken a look at this plugin, I am entirely unsurprised to see it contains an uncomfortable amount of what I consider to be either bad bash, or pointless line noise.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB