[BusyBox] login help please

Mark Richards mark.richards at massmicro.com
Mon Feb 21 18:19:49 UTC 2005


Maybe you're missing an /etc/shrc file or the associated connection to
/etc/profile script/s?

I speak from how my embedded system is set up - this advice probably doesn't
apply to all distributions.


/etc/shrc:

for FILE in /etc/profile.d/*.sh ; do
	if [ -x $FILE ]; then
		. $FILE
	fi
done

unset FILE

Profile.d/prompt.sh:

LANG=C
export LANG

cdprompt ()
{
	cd $*
	PS1="[$LOGNAME@$HOSTNAME $PWD]$$"
	if [ `id -u` = 0 ]; then
		PS1=$PS1"# "
	else
		PS1=$PS1"$ "
	fi
}

case "$-" in
	*i*)
		# Use it
		alias cd=cdprompt

		# Initialise PS1
		cdprompt `pwd`
Esac


 

-----Original Message-----
From: busybox-bounces at mail.codepoet.org
[mailto:busybox-bounces at mail.codepoet.org] On Behalf Of Mark Beckwith
Sent: Monday, February 21, 2005 12:39
To: busybox at mail.codepoet.org
Subject: [BusyBox] login help please

When I run my system using busybox, I get the string:

"Please press Enter to activate this console."

Then I hit enter and I get a # prompt.  The current directory is /.  

It doesn't seem to be setting my current directory to /root like I want (as
specified in the /etc/passwd file).

When I do do a "su -", the current directory becomes /root, but it doesn't
seem to run my .bashrc, .ashrc, .shrc, or whatever I call it.  

A little guidance please,

Thanks,

Mark

--
Mark Beckwith, Intrig (http://www.intrig.com)




More information about the busybox mailing list