Xiaodan Tang(deleted)
09/25/2007 11:41 AM
post1577
|
> I managed to get this working well enough to compile bash. However there are
> a couple things I would like to figure out how to do.
>
> It appears to work well enough and understand the it has to add bash to /etc/
> shells, etc. I would also like to have it create a link (I am using a hard
> link) between /etc/profile.d/qnxsdk.sh and /etc/profile.d/qnxsdk.bash so that
> I get all the envars and path's I need to actually use bash as my shell.
I can think of 2 ways.
Modify the shells/bash/Makefile, to have a "post-install" target, do the link you want there. (Wrap it with a .if $
{OPSYS} == "QNX", look at the textproc/groff/Makefile).
Or, create a PLIST.qnx and modify Makefile to have it use PLIST.qnx to install? (not quite sure).
> This unfortunately isn't enough - and I know I have figured this out before,
> but can't recall what I did. The problem is bash doesn't honor, or is not
> started correctly by photon so that it is a login shell. This means it
> doesn't run my .profile and doesn't get the commands to read in the above
> mentioned /etc/profile.d/qnxsdk.bash.
>
> I am sure there is a quick fix to this but I can't recall what it is. Anyone
> know?
Note sure about this one. I will have a look...
-xtang
|
|
|
Thomas Fletcher
09/25/2007 12:47 PM
post1585
|
> -----Original Message-----
> From: Rick Duff [mailto:rgduff@gmail.com]
> Sent: September 25, 2007 11:12 AM
> To: general-pkgsrc
> Subject: bash problems
>
> I managed to get this working well enough to compile bash.
> However there are a couple things I would like to figure out
> how to do.
>
> It appears to work well enough and understand the it has to
> add bash to /etc/shells, etc. I would also like to have it
> create a link (I am using a hard link) between
> /etc/profile.d/qnxsdk.sh and /etc/profile.d/qnxsdk.bash so
> that I get all the envars and path's I need to actually use
> bash as my shell.
>
> This unfortunately isn't enough - and I know I have figured
> this out before, but can't recall what I did. The problem is
> bash doesn't honor, or is not started correctly by photon so
> that it is a login shell. This means it doesn't run my
> .profile and doesn't get the commands to read in the above
> mentioned /etc/profile.d/qnxsdk.bash.
>
> I am sure there is a quick fix to this but I can't recall
> what it is. Anyone know?
Part of this may be related to the sillyness that is in the
/etc/profile startup file that sources files in /etc/profile.d/
with an extension mapping the shell type.
This is what gives you your QNX_HOST/TARGET environment variables
for example. You can see this problem if you change your shell
from /bin/sh to /bin/ksh .. all of a sudden the "default" environment
dissapears.
Hope this helps,
Thomas
|
|
|
Xiaodan Tang(deleted)
09/25/2007 4:06 PM
post1591
|
> This unfortunately isn't enough - and I know I have figured this out before,
> but can't recall what I did. The problem is bash doesn't honor, or is not
> started correctly by photon so that it is a login shell. This means it
> doesn't run my .profile and doesn't get the commands to read in the above
> mentioned /etc/profile.d/qnxsdk.bash.
>
> I am sure there is a quick fix to this but I can't recall what it is. Anyone
> know?
I took a look.
phlogin is looking 2 places for paramaters. $HOME/.ph/login/shells/$SHELL and then /etc/photon/login/shells/$SHELL
So if you create a $HOME/.ph/login/shells/bash, with one line in it:
bash --login
Things should be fine.
Interesting enough, we do ship a /etc/photon/login/bash, which is in wrong place. (it has to be login/shells/bash). I
did this on my system to make it work (this sounds like an install bug)
# cd /etc/photon/login
# ln -sf . shells
And now everyone use bash in the system should got the profile.bash in there login.
Hope this helpful.
-xtang
|
|
|