Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
Closed #1977. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#event-2516023186___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
I applied a slightly different patch for enabling test mode from command line, enclosing the variable in double quotes - 4968e8994157f1152bf7461b16049d67e5c9cc59 . For the bash related problems, I will open a dedicated issue on tracker to decide on a proper solution. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-515937217___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
It seems that the issue is expanding the variable when getting the answer for y/n question: * https://github.com/kamailio/kamailio/blob/master/utils/kamctl/kamdbctl.base#L216-L218 Such expression seems to be specific for bash: * https://mywiki.wooledge.org/Bashism We should decide what to do to have an acceptable solution. Or maybe focus to make kamcli a (full) replacement for kamctl/kamdbctl and get rid of those old-style shell/bash scripts. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-506336830___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
I fear that applying 2c8fe55 will break compatibility for embedded systems again (issue #1815). Can you execute the kamdbctl create with 'bash -x' prefixed and see where exactly it stops? Maybe it is possible to just make this substitution to confirm to POSIX standard as well. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-506027816___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
@miconda Here is the output of `kamdbctl create`: ```bash MySQL password for root: -e \E[37;33mINFO: creating database kamailio_simple_db ... -e \E[37;33mINFO: granting privileges to database kamailio_simple_db ... -e \E[37;33mINFO: creating standard tables into kamailio_simple_db ... -e \E[37;33mINFO: Core Kamailio tables succesfully created. Install presence related tables? (y/n): n /usr/sbin/kamdbctl: 216: /usr/sbin/kamdbctl: Bad substitution ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-502339967___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
Unfortunately I have no access to that system now, I will revert the change and test again. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-501635264___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
Can you paste the the command you run and the entire error message printed in the terminal to try to track it properly? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-501630909___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
@miconda It causes `Substitution Error`. I search for that error and I found that the cause is that `sh` links to `dash` in Debian Stretch. I change the `/bin/sh` to `/bin/bash` and error resolved. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-501629293___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
@alishir - what were the errors related to commit 2c8fe55? Stretch is out for long time, nobody reported the errors so far. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1977#issuecomment-501624363___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamctl: enable kamctl test from shell variable. (#1977)
@alishir pushed 1 commit. 2c8fe55a2617892e129e613a5950bb8c0228f59e kamdbctl: change /bin/sh to /bin/bash -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1977/files/2dfbde091023bb0a6b3723046766cf51ae876e03..2c8fe55a2617892e129e613a5950bb8c0228f59e ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev