Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Re: telnet. No, I was saying that because telnetd is responsible for launching login, which wipes out ALL environment variables, the shell started by login does not inherit any environment variables you set inside rcS. And because the shell created by login is not a login shell, your profiles are not read. Thus, no way to pass your environment variable. The only way I could see was to modify the telnetd program to call login -p instead of just login, which allows you to pass environment variables.
Alternatively, you could modify either the login program, or the shell program.
I don't know what your getty's will do - there is a configuration file that instructs those getty's on what to do. Check the documentation for busybox regarding gettydefs.
No need to rebuild a kernel - this is a simple problem with the programs indicated thus far.
Now, with all this said, you might want to ask once for good measure on the busybox forums or mailing list. Perhaps they will give you an easy answer I didn't find.
I'm not sure I understand - is /bin/bash a script, that runs another shell subsequently? If so, please show the contents of /bin/bash. I hadn't considered that /bin/bash was just a script, as that would be very unusual.
If /bin/bash is a symlink or hard link to /bin/sh, then they are one and the same as far as execution is concerned.
You can just add your lines:
ENV = ~/.loginscript
to the file.
If you want two different files, one /bin/bash and one /bin/sh, which different content, you need to delete either the symlink, or the /bin/bash hard link. Then, copy /bin/sh to /bin/bash, and make your changes to /bin/bash.