I’ve got tons of custom commands. In RHEL they used to work fine but some of the custom commands have “echo -e” in menu’s that are built. I noticed the “-e” is showing up in the menus because echo isn’t recognizing the “-e” and this is due to webmin utilizing the built-in echo within the shell versus /usr/bin/echo. If I modify the custom command and replace /usr/bin/echo for the “echo” then the “-e” get’s used as intended and doesn’t show up on the custom command menu. Is there any way to ask webmin to prefer the /usr/bin/echo versus the built in? I understand there are security reasons for echo being built-in but so far I don’t have a reason to NOT switch the behavior of webmin if possible. TIA.
Can I pass some kind of custom environment variable to webmin that says echo=“/usr/bin/echo” via the Operating System and Environment controls within webmin and if yes. What would the variable name and value be? echo = variable name and /usr/bin/echo = value?
Webmin just runs custom commands using the root user’s shell, so if echo is run as a built-in by default the same will happen in the custom command. The only work-around is to use the full /usr/bin/echo path.
Jamie, I just checked on this and it would seem this (where ubuntu is concerned) is a little different than described based on the following tests:
root@ip-10-0-0-244:~# echo $0
-bash
If I use the Command Shell module in Webmin I see the following:
echo $0
sh
So webmin custom commands won’t support any “interactive” features because it’s running in non interactive mode?