On Wed, 24 Dec 2008, Denys Vlasenko wrote:
> On Wednesday 24 December 2008 10:03, Alexander Kriegisch wrote:
> > > Unlike bash, ash does not have anything like ~/.bashrc,
> > > which could be useful here.
> >
> > My BusyBox version is 1.9.0 and in it Ash supports ~/.profile as well as
> > /etc/profile. So unless this has been refactored out of BB, it should
> > work. I use it every day.
>
> Yes, you use it as a LOGIN shell:
>
> if (isloginsh) { <----------------------
> state = 1;
> read_profile("/etc/profile");
> state1:
> state = 2;
> read_profile(".profile");
> }
>
> And ash is a login shell if it has an -l or --login option
> on its command line, or its argv[0] starts with dash.
>
> Neither of this is true in the case we discuss.
>
> I not only read the code, I also verified it with strace.
ah, so when it's invoked with "telnetd -l /bin/sh", that's not a
login shell. and adding a "-" would solve the problem?
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox