Hello @miconda,
Indeed this script goes way back and i am still getting familiar with the codebase. You
are suggesting that `/etc/kamailio/kamctl` should be and is the base config file and that
is fine.
I see some flows as it right now.
1) What if user has installed kamailio not from official packages but another way in a non
standard location. That file is nowhere to be found. Hence, all the other locations will
be used to source with order described already (messy i believe). Even `bash` that you
have mention, has the base `/etc/profile` and then **one of** `~/.bash_profile`,`
~/.bash_login`,`~/.profile` sourced according to [man
bash](https://linux.die.net/man/1/bash ), `invocation section`.
2) The current code has the base of kamctl to be the one residing in the **same folder as
kamctl**, ie `{install_prefix}/sbin/kamctlrc`, when `/etc/kamailio/kamctl` should be the
base. If right now , I have a config in the same folder that kamctl is (the user config as
you say and none of the other two exist, `{install_prefix}/etc/kamilio/kamctlrc` and
`~/.kamctlrc`), my options would be overridden by /etc/ one when in fact i placed this to
overwrite it. This is due to the search order of kamctl in the script.
Just my observations and thank you for the readable commit!
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3594#issuecomment-1750145688
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3594/c1750145688(a)github.com>