howto spawn shell when env variable doesn't point to /bin/sh
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
howto spawn shell when env variable doesn't point to /bin/sh
Hi,
I have my environment (ENV) variable set to a shell script that used dialog and ncurses to display a graphical menu. One of the options of the menu is to spawn a shell.
When this option is chosen, the shell immediately spawns but then runs my menu again.
Is there a way I can spawn just a shell, and not run the environment variable everytime or some other way of achieving this?
You had a great idea. I just realised though that ash doesn't support this environment variable. I am attempting to see if I can remedy that or maybe somehow create my own variable. I guess I could just set a variable in the profile before the env setting and check if its set before setting the env to the menu. I will try that.
I guess I could just set a variable in the profile before the env setting and check if its set before setting the env to the menu.
Clean solution. Exporting once should prolly do. Inheritance and all that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.