/etc/profile.d/java-config-2.sh fails to handle the case when $UID is already set. Adding an else branch to the first if clause with user_id="${UID}" fixes the problem. Reproducible: Always
Created attachment 407502 [details, diff] Fix this and other set -u issues This problem is not only cosmetical if the profile is sourced with set -u: Then it gives an error and stops further sourcing. The attached patch fixes this and some other issues with set -u (Note that working with set -u makes sense, since it is the only available form of a "strict" syntax checking in shell code.) The attached patch also fixes some (more theoretical) quoting problems and does not append ":" to MANPATH is MANPATH was previously empty or unset.