* .bashrc not being used by root account @ 2012-10-16 16:02 Jonathan Haws 2012-10-17 6:25 ` Venkata ramana gollamudi 0 siblings, 1 reply; 5+ messages in thread From: Jonathan Haws @ 2012-10-16 16:02 UTC (permalink / raw) To: yocto@yoctoproject.org I have modified the .bashrc file for the system, however the root account does not seem to use it by default. What am I missing? I would rather not have to source the .bashrc file every time I login as root. Thanks, Jonathan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bashrc not being used by root account 2012-10-16 16:02 .bashrc not being used by root account Jonathan Haws @ 2012-10-17 6:25 ` Venkata ramana gollamudi 2012-10-17 8:29 ` Mihai Lindner 0 siblings, 1 reply; 5+ messages in thread From: Venkata ramana gollamudi @ 2012-10-17 6:25 UTC (permalink / raw) To: Jonathan Haws; +Cc: yocto@yoctoproject.org You can check the same with "strace -f bash" You can see the files being loaded, as there is a rc file loading sequence exists for bash. Regards, Ramana ________________________________________ From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Jonathan Haws [Jonathan.Haws@sdl.usu.edu] Sent: Tuesday, October 16, 2012 9:32 PM To: yocto@yoctoproject.org Subject: [yocto] .bashrc not being used by root account I have modified the .bashrc file for the system, however the root account does not seem to use it by default. What am I missing? I would rather not have to source the .bashrc file every time I login as root. Thanks, Jonathan _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bashrc not being used by root account 2012-10-17 6:25 ` Venkata ramana gollamudi @ 2012-10-17 8:29 ` Mihai Lindner 2012-10-18 16:52 ` Jonathan Haws 0 siblings, 1 reply; 5+ messages in thread From: Mihai Lindner @ 2012-10-17 8:29 UTC (permalink / raw) To: yocto On 10/17/2012 09:25 AM, Venkata ramana gollamudi wrote: > You can check the same with "strace -f bash" > You can see the files being loaded, as there is a rc file loading sequence exists for bash. > > Regards, > Ramana > > ________________________________________ > From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Jonathan Haws [Jonathan.Haws@sdl.usu.edu] > Sent: Tuesday, October 16, 2012 9:32 PM > To: yocto@yoctoproject.org > Subject: [yocto] .bashrc not being used by root account > > I have modified the .bashrc file for the system, however the root account does not seem to use it by default. What am I missing? I would rather not have to source the .bashrc file every time I login as root. Try `echo $0` to see the shell you're in. By default you should be in `sh`, which does not source .bashrc. You can execute `bash` after login, or change the login shell of 'root'. Cheers, --Mihai > > Thanks, > Jonathan > > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- Mihai Lindner ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bashrc not being used by root account 2012-10-17 8:29 ` Mihai Lindner @ 2012-10-18 16:52 ` Jonathan Haws 2012-10-19 11:50 ` Mihai Lindner 0 siblings, 1 reply; 5+ messages in thread From: Jonathan Haws @ 2012-10-18 16:52 UTC (permalink / raw) To: Mihai Lindner, yocto@yoctoproject.org, ramana.gollamudi@huawei.com Okay, I have done a couple of things: 1. I appended to the base-passwd recipe and added my own patch that would patch the passwd file to have root use a bash shell. I have verified that this is the case when I login via echo $0. It tells me that root's shell is bash. 2. I have appended to the base-files recipe and added a do_install_append() function to my bbappend file that copies the dot.bashrc to /home/root/.bashrc. I have verified that this is taking place and the .bashrc file is actually in /home/root. 3. I ran 'strace -f bash' after logging in and /home/root/.bashrc is sourced (I saw it in the output and my aliases were available). However, upon first login, it appears that /home/root/.bashrc is NOT sourced by bash. How can I get bash to source that file when I login at a console? Thanks for the help! Jonathan ________________________________________ From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Mihai Lindner [mihaix.lindner@linux.intel.com] Sent: Wednesday, October 17, 2012 02:29 To: yocto@yoctoproject.org Subject: Re: [yocto] .bashrc not being used by root account On 10/17/2012 09:25 AM, Venkata ramana gollamudi wrote: > You can check the same with "strace -f bash" > You can see the files being loaded, as there is a rc file loading sequence exists for bash. > > Regards, > Ramana > > ________________________________________ > From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Jonathan Haws [Jonathan.Haws@sdl.usu.edu] > Sent: Tuesday, October 16, 2012 9:32 PM > To: yocto@yoctoproject.org > Subject: [yocto] .bashrc not being used by root account > > I have modified the .bashrc file for the system, however the root account does not seem to use it by default. What am I missing? I would rather not have to source the .bashrc file every time I login as root. Try `echo $0` to see the shell you're in. By default you should be in `sh`, which does not source .bashrc. You can execute `bash` after login, or change the login shell of 'root'. Cheers, --Mihai > > Thanks, > Jonathan > > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- Mihai Lindner _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bashrc not being used by root account 2012-10-18 16:52 ` Jonathan Haws @ 2012-10-19 11:50 ` Mihai Lindner 0 siblings, 0 replies; 5+ messages in thread From: Mihai Lindner @ 2012-10-19 11:50 UTC (permalink / raw) To: yocto On 10/18/2012 07:52 PM, Jonathan Haws wrote: > Okay, I have done a couple of things: > > 1. I appended to the base-passwd recipe and added my own patch that would patch the passwd file to have root use a bash shell. I have verified that this is the case when I login via echo $0. It tells me that root's shell is bash. > > 2. I have appended to the base-files recipe and added a do_install_append() function to my bbappend file that copies the dot.bashrc to /home/root/.bashrc. I have verified that this is taking place and the .bashrc file is actually in /home/root. > > 3. I ran 'strace -f bash' after logging in and /home/root/.bashrc is sourced (I saw it in the output and my aliases were available). > > However, upon first login, it appears that /home/root/.bashrc is NOT sourced by bash. How can I get bash to source that file when I login at a console? > There are 2 solutions for this: rename your .bashrc in .profile, or copy /etc/skel/.profile in /root/.profile .bashrc is sourced only for non-login shells. For console login shells only .profile (or .bash_profile or .bash_login) is sourced. Cheers, --Mihai > Thanks for the help! > Jonathan > > > ________________________________________ > From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Mihai Lindner [mihaix.lindner@linux.intel.com] > Sent: Wednesday, October 17, 2012 02:29 > To: yocto@yoctoproject.org > Subject: Re: [yocto] .bashrc not being used by root account > > On 10/17/2012 09:25 AM, Venkata ramana gollamudi wrote: >> You can check the same with "strace -f bash" >> You can see the files being loaded, as there is a rc file loading sequence exists for bash. >> >> Regards, >> Ramana >> >> ________________________________________ >> From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Jonathan Haws [Jonathan.Haws@sdl.usu.edu] >> Sent: Tuesday, October 16, 2012 9:32 PM >> To: yocto@yoctoproject.org >> Subject: [yocto] .bashrc not being used by root account >> >> I have modified the .bashrc file for the system, however the root account does not seem to use it by default. What am I missing? I would rather not have to source the .bashrc file every time I login as root. > > Try `echo $0` to see the shell you're in. By default you should be in > `sh`, which does not source .bashrc. > You can execute `bash` after login, or change the login shell of 'root'. > > Cheers, > --Mihai > >> >> Thanks, >> Jonathan >> >> _______________________________________________ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto >> _______________________________________________ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto >> > > > -- > Mihai Lindner > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > -- Mihai Lindner ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-19 11:50 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-10-16 16:02 .bashrc not being used by root account Jonathan Haws 2012-10-17 6:25 ` Venkata ramana gollamudi 2012-10-17 8:29 ` Mihai Lindner 2012-10-18 16:52 ` Jonathan Haws 2012-10-19 11:50 ` Mihai Lindner
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.