For years I use /etc/profile.local for sourcing two files that set environment variables and define bash functions.
..........
source "$MY_SCRIPT_PATH/Bin/system_common_function" 1> /dev/null
source "$MY_SCRIPT_PATH/Bin/system_common_general_env_var" 1> /dev/null
...........
What is different to-day with 15.5 is that functions does not survive the end of execution of /etc/profile.local.
Variables are still defined, but function not
Example for function called in a terminal konsole :
user_install@15-5---G731GV:~> stop_or_continue "153" "TEST"
If 'stop_or_continue' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf stop_or_continue
A good response should be :
user_install@15-5---G731GV:~> stop_or_continue "153" "TEST"
LINENO : 153
MESG : TEST
Strike a key to continue
Strike CTRL-C to abort
Example for a variable in a terminal konsole :
user_install@15-5---G731GV:~> echo "$E_BAD_EXEC"
112
As you can see, variables are still defined.
The following show journald under 15.5 during boot :
Sep 08 15:16:34 15-5---G731GV sddm[1688]: Session started
Sep 08 15:16:34 15-5---G731GV systemd[2614]: Started D-Bus User Message Bus.
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2670]: hBc - /etc/profile.local --- -*-µ-*-µ- BEGIN -*-µ-*-µ-
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2675]: hBc - /etc/profile.local --- [id] uid=1000(user_install) gid=100(users) groups=100(users) -- USER [id -nu] : user_install -- $USER : user_install -- PROFILE_LOG_USER : user_install
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2678]: hBc - /etc/profile.local --- RUNNING REAL MACHINE
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2679]: hBc - /etc/profile.local --- NON-INTERACTIVE
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2681]: hBc - /etc/profile.local --- BACKUP_SYS_SCRIPT_PATH : /backup_sys/000_COMMON
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2684]: hBc - /etc/profile.local --- SOURCING : /backup_sys/000_COMMON/Bin/system_common_function
Sep 08 15:16:34 15-5---G731GV JCD_SYSTEM_COMMON_FUNC[2687]: /backup_sys/000_COMMON/Bin/system_common_function - ^^^ BEGIN ^^^ - USER : user_install
Sep 08 15:16:34 15-5---G731GV JCD_SYSTEM_COMMON_FUNC[2688]: /backup_sys/000_COMMON/Bin/system_common_function - SYSTEM_COMMON_FUNCTION_EXPORT : 1
Sep 08 15:16:34 15-5---G731GV JCD_SYSTEM_COMMON_FUNC[2691]: /backup_sys/000_COMMON/Bin/system_common_function - ^^^ END ^^^ - USER : user_install
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2698]: hBc - /etc/profile.local --- SUCCESS SOURCED DONE : /backup_sys/000_COMMON/Bin/system_common_function
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2699]: hBc - /etc/profile.local --- SUCCESS SOURCED FOUND function FUNCTIONS
Sep 08 15:16:34 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2701]: hBc - /etc/profile.local --- SOURCING : /backup_sys/000_COMMON/Bin/system_common_general_env_var
Sep 08 15:16:34 15-5---G731GV JCD_SYSTEM_COMMON_GEN_ENV[2704]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - BEGIN - USER : user_install
Sep 08 15:16:35 15-5---G731GV JCD_SYSTEM_COMMON_GEN_ENV[2773]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - SYSTEM_COMMON_GENERAL_ENV_VAR_EXPORT : 1
Sep 08 15:16:35 15-5---G731GV JCD_SYSTEM_COMMON_GEN_ENV[2776]: /backup_sys/000_COMMON/Bin/system_common_general_env_var - END - USER : user_install
Sep 08 15:16:35 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2778]: hBc - /etc/profile.local --- SUCCESS SOURCED DONE : /backup_sys/000_COMMON/Bin/system_common_general_env_var
Sep 08 15:16:35 15-5---G731GV JCD_ETC_PROFILE_LOCAL[2783]: hBc - /etc/profile.local --- FOUND 94 FUNCTIONS --- -*-µ-*-µ- END -*-µ-*-µ-
Sep 08 15:16:35 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[2790]: hBc - /etc/bash.bashrc.local --- °-&-°-&-° BEGIN °-&-°-&-°
Sep 08 15:16:35 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[2795]: hBc - /etc/bash.bashrc.local --- [id] uid=1000(user_install) gid=100(users) groups=100(users) -- [id -nu] : user_install -- $USER : user_install -- BASHRC_LOG_USER : user_install
Sep 08 15:16:35 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[2796]: hBc - /etc/bash.bashrc.local --- NON-INTERACTIVE
Sep 08 15:16:35 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[2807]: hBc - /etc/bash.bashrc.local --- FOUND 94 FUNCTIONS --- °-&-°-&-° END °-&-°-&-°
Sep 08 15:16:36 15-5---G731GV systemd[2614]: Reloading.
Sep 08 15:16:36 15-5---G731GV systemd[2614]: Created slice User Background Tasks Slice.
/etc/profile.local define with success my functions and my variables.
/etc/bash.bashrc.local confirm the existance of my functions.
Now if i start a terminal konsole, /etc/bash.bashrc.local confirm the disappearance of my functions.
Only two functions founded :
Sep 08 15:16:53 15-5---G731GV systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Sep 08 15:16:53 15-5---G731GV systemd[1]: systemd-localed.service: Deactivated successfully.
Sep 08 15:17:18 15-5---G731GV systemd[2614]: Started Konsole - Terminal.
Sep 08 15:17:18 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[3577]: himBH - /etc/bash.bashrc.local --- °-&-°-&-° BEGIN °-&-°-&-°
Sep 08 15:17:18 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[3582]: himBH - /etc/bash.bashrc.local --- [id] uid=1000(user_install) gid=100(users) groups=100(users) -- [id -nu] : user_install -- $USER : user_install -- BASHRC_LOG_USER : user_install
Sep 08 15:17:18 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[3583]: himBH - /etc/bash.bashrc.local --- INTERACTIVE
Sep 08 15:17:18 15-5---G731GV JCD_ETC_BASH_BASHRC_LOCAL[3594]: himBH - /etc/bash.bashrc.local --- FOUND 2 FUNCTIONS --- °-&-°-&-° END °-&-°-&-°
It had worked for years , but failed with 15.5.
Any help is welcome.